From af26ba7d2eae4d3058f2ae4b70e453f7643ed274 Mon Sep 17 00:00:00 2001 From: Michael Wood-Vasey Date: Fri, 19 Jul 2024 11:44:50 -0400 Subject: [PATCH] Better document command-line examples to run to test. --- README.md | 9 ++++++++- tests/test_one_lightcurve.sh | 18 +++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 27a5f63..3d0d0eb 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,15 @@ ${DATADIR}/truth/H158/42193/Roman_TDS_index_H158_42193_1.txt Install required packages. See `requirements_conda.txt` and `requirements_pip.txt` for the respective requirements. (Not all needed packages are available via Conda). +On NERSC ``` +INFODIR=/pscratch/sd/w/wmwv/RomanDESC DATADIR=/pscratch/sd/w/wmwv/RomanDESC transient_id=41024123441 -python RomanDESCForwardModelLightcurves.py ${transient_id} --datadir ${DATADIR} +python RomanDESCForwardModelLightcurves.py ${transient_id} --infodir ${INFODIR} --datadir ${DATADIR} --dataset RomanDESC +``` + +A general test example script. Update the variables in the script to match your local system locations for DATADIR. +``` +sh tests/test_one_lightcurve.sh ``` diff --git a/tests/test_one_lightcurve.sh b/tests/test_one_lightcurve.sh index 56b6591..d5eb99d 100755 --- a/tests/test_one_lightcurve.sh +++ b/tests/test_one_lightcurve.sh @@ -1,5 +1,17 @@ -# Change this to what the RomanDESCSims data are. -# Below DATADIR should be the subdirectories 'images' and 'truth'. +# A general test example script. +# Update the variables in the script to match your local system locations for DATADIR. +# In DATADIR should be the subdirectories 'images' and 'truth'. DATADIR=${HOME}/data/RomanDESCSims + +# In INFODIR should be transient_info_table.csv +# transient_host_info_table.csv +# We have these in tests/data for a few transients, so we can use those to test +INFODIR=tests/data/RomanDESC +DATASET=RomanDESC +oid=41024123441 # Run from base directoroy -python python/RomanDESCForwardModelLightcurves.py 41024123441 --infodir tests/data/RomanDesc --datadir ${DATADIR} --dataset RomanDESC +python python/RomanDESCForwardModelLightcurves.py \ + ${oid} \ + --infodir ${INFODIR} \ + --datadir ${DATADIR} \ + --dataset ${DATASET}