Closed soso128 closed 2 years ago
Thanks @soso128!
I see you’ve already added the docstrings—excellent! Unfortunately, it looks like you accidentally included some unrelated changes to collate()
in 3bc87a4. Once you remove those, I think part 1 looks good.
Regarding part 2: ROOT is a very heavy dependency (in terms of time and disk space to install) and, in my experience, quite fragile when it comes to binary compatibility with different versions of Python. So I would be very hesitant before depending on it for a core feature of SNEWPY. Since this code also appears to duplicate a lot of the code from snewpy.snowglobes.collate()
, maybe it would be better to have a sample script in snewpy/python/scripts/
that demonstrates how to take the tables returned by snewpy.snowglobes.collate()
and write those to a ROOT file?
Ok, done. Indeed it would be better to write a code in scripts/ for the ROOT output. I'll do this.
I just added a script for the ROOT output (and removed the previous code)
This pull request contains two commits:
1- Added an argument to generate_time_series and generate_fluence in snowglobes.py: this dictionary allows to give keyword arguments to define SN models (EOS, etc...)
2- Added a new code to get ROOT 2D histograms for the rates, instead of collated text files