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

Digits removed when collating files #122

Closed soso128 closed 3 years ago

soso128 commented 3 years ago

Dear All,

I have installed the following commit of snewpy: 7ac532a4f4cd6723e53e3f41ed023ed542f63373 and modified python/snewpy/scripts/TimeSeries.py to keep all the generated files, using:

snowglobes.collate(SNOwGLoBES_path, outfile, detector_input="icecube", skip_plots=True, remove_generated_files = False)

When I compare the collated files to the original files, I find that, for a few rate values and for some files, the first digit of the result has been removed. See for example the IBD rate for E = 0.002739 GeV in:

nakazato-LS220-BH-z0.004-s30.0.tbin9.AdiabaticMSW_NMO.-0.110,0.342,30-10.0kpc_ibd_icecube_events_smeared_unweighted.dat (rate = 3.65327e-05)

compared to

Collated_nakazato-LS220-BH-z0.004-s30.0.tbin9.AdiabaticMSW_NMO.-0.110,0.342,30-10.0kpc_icecube_events_smeared_unweighted.dat (rate = 6.5327e-06)

Best regards, Sonia

JostMigenda commented 3 years ago

Hi Sonia, thanks for reporting this! I’ve been able to reproduce it and find the underlying issue; will post a PR with a fix in a minute.

soso128 commented 3 years ago

Hi Jost, I confirm that it works with your patch. Thanks a lot!

JostMigenda commented 3 years ago

Excellent, thanks for checking! 🎉