Skip to content

Commit

Permalink
Remove magic directories from scripts/make_preloaded.sh.
Browse files Browse the repository at this point in the history
The user should not have to guess which is the "right" directory from
which to run the script.
  • Loading branch information
kfindeisen committed Oct 8, 2024
1 parent ff260c3 commit 7c77992
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions scripts/make_preloaded.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 7c77992

Please sign in to comment.