From 7c779922a9776d42d066afa2696986a80124cefe Mon Sep 17 00:00:00 2001 From: Krzysztof Findeisen Date: Tue, 8 Oct 2024 11:40:19 -0700 Subject: [PATCH] Remove magic directories from scripts/make_preloaded.sh. The user should not have to guess which is the "right" directory from which to run the script. --- scripts/make_preloaded.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/scripts/make_preloaded.sh b/scripts/make_preloaded.sh index 50974ad..cf93695 100755 --- a/scripts/make_preloaded.sh +++ b/scripts/make_preloaded.sh @@ -4,26 +4,30 @@ set -e set -x +SCRIPT_DIR="$( dirname -- "${BASH_SOURCE[0]}" )" +DATASET_REPO="${SCRIPT_DIR}/../preloaded/" + + # base butler repo and instrument -bash scripts/make_empty_preloaded_butler.sh +bash "${SCRIPT_DIR}/make_empty_preloaded_butler.sh" # get calibs from original repo -python scripts/import_calibs.py -c 2.2i/calib +python "${SCRIPT_DIR}/import_calibs.py -c 2.2i/calib" # templates -python scripts/import_templates.py -t u/elhoward/DM-38451/templates -w "skymap='DC2' and tract=4431 and patch IN(9,10,16,17) and band='r'" +python "${SCRIPT_DIR}/import_templates.py" -t u/elhoward/DM-38451/templates -w "skymap='DC2' and tract=4431 and patch IN(9,10,16,17) and band='r'" # refcats -python scripts/get_refcats.py +python "${SCRIPT_DIR}/get_refcats.py" # pretrained NN models -python scripts/get_nn_models.py -m rbResnet50-DC2 +python "${SCRIPT_DIR}/get_nn_models.py" -m rbResnet50-DC2 -bash scripts/generate_fake_injection_catalog.sh -b preloaded -o fake-injection-catalog +bash "${SCRIPT_DIR}/generate_fake_injection_catalog.sh" -b preloaded -o fake-injection-catalog # collection chains -butler collection-chain preloaded LSSTCam-imSim/defaults templates/goodSeeing skymaps LSSTCam-imSim/calib \ +butler collection-chain "${DATASET_REPO}" LSSTCam-imSim/defaults templates/goodSeeing skymaps LSSTCam-imSim/calib \ refcats models fake-injection-catalog # make the export file for ap_verify to use -python scripts/make_preloaded_export.py +python "${SCRIPT_DIR}/make_preloaded_export.py"