RickKessler / SNANA

Supernova Analysis package
38 stars 23 forks source link

filter name issue when simulate light curves #1446

Closed qnwang93 closed 4 days ago

qnwang93 commented 1 week ago

I try to run simulation on the NERSC server using commands like:

snlc_sim.exe JLA_TRAINING_SNLS3.INPUT

In the generated light curves, the band names are the last characters of band names in kcor files, instead of the full band name. That cause those light curve files unreadable by trainsalt. Attached are the simulation input and kcor files I used. JLA_TRAINING_SNLS3.INPUT.txt kcor_SNLS.fits.zip

RickKessler commented 1 week ago

please provide path and command to run on Perlmutter@NERSC.

qnwang93 commented 1 week ago

I was running command snlc_sim.exe JLA_TRAINING_SNLS3.INPUT in my personal directory/global/homes/q/qnwang/. Do you have access to that? Or maybe I could make a copy in some common directory?

RickKessler commented 1 week ago

A long time ago I updated SNANA to read/write full filter names in data, but still keep single char for sims in order to avoid increasing disk space. Here I updated code again to write full filter names for sim as well as for data. Also added MXCHAR string length check on both FILTER name and FIELD name to avoid memory overwrite (both allowed up to 20 chars).