dessn / Pippin

Pipeline for photometric SN analysis
MIT License
9 stars 10 forks source link

Error doing 0_DATAPREP #163

Closed bap37 closed 7 months ago

bap37 commented 7 months ago

Accidentally opened it over here in SNANA github!

https://github.com/RickKessler/SNANA/issues/1311

OmegaLambda1998 commented 7 months ago

I have no idea how this is the first time this broke!

So there is no VERSION_PHOTOMETRY key, instead the version photometry is taken from os.path.basename(raw_dir) i.e. the last directory in RAW_DIR. The error is that if the RAW_DIR has a trailing slash (/project2/rkessler/SURVEYS/SDSS/USERS/BAP37/MAT+BRODIE-ZTF/ZTF_ROOT/lcmerge/ZTFDR2_COMBINED_CUT/ instead of /project2/rkessler/SURVEYS/SDSS/USERS/BAP37/MAT+BRODIE-ZTF/ZTF_ROOT/lcmerge/ZTFDR2_COMBINED_CUT) then basename instead returns an empty string, leading to the error. I've added a check for a trailing slash which will remove it if it exists, which should stop this from happening again.