SNEWS2 / snewpy

A Python package for working with supernova neutrinos
https://snewpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
26 stars 19 forks source link

SNOwGLoBES 1.3 Compatibility #201

Closed Storreslara closed 1 year ago

Storreslara commented 2 years ago

Currently the channel file structure for custom binning breaks SNEWPY's channel.dat dataframe. This is due to the 'SN_nu' tag put in the beginning of each line (needed to use a the custom binning postamble file ).

To get rid of the SN_nu tag while making the df use the following code

df_chan = pd.read_csv(path_chan, sep=" ", header=None)

if df_chan[0][0] == "SN_nu":
    df_chan.drop(df_chan.columns[0], axis=1, inplace=True)

# then you can add the col names.. 
JostMigenda commented 2 years ago

Another change in the new SNOwGLoBES version is going to be that efficiency and smearing files are in detector-specific subdirectories, so we need to update the file paths in SimpleRate._load_efficiency_vectors() and SimpleRate._load_smearing_matrices() accordingly.