icecube / pisa

Monte Carlo-based data analysis
http://icecube.github.io/pisa/
Apache License 2.0
19 stars 47 forks source link

Convert all PISA code to use the `Data` object... #364

Open jllanfranchi opened 7 years ago

jllanfranchi commented 7 years ago

@ShiveshM has developed a very useful successor to the Events object in the Data object (see $PISA/pisa/core/events.py, same file for both classes). This allows for "dynamically" combining flavints together (might still be some work to get weights right) and also generalizes simply to noise and mouons (and presumably other things we can throw at it).

He has also made this a shared object that can be used by all stages in his pipeline, eliminating redundancy and ensuring consistency in the events that are used by each stage. This is a behavior we should replicate in all the stages.

There are probably many other issues to consider, so feel free to add any you can think of.

ShiveshM commented 7 years ago

Selecting the non-neutrino data is clunky at the moment - they can only be directly select from the data object (i.e. data_object['muons']) and there's also a lot of copy-paste code to deal with the different particle types (e.g. in the __init__). One way to make this more generic is using a NuFlavInt* class which incorporates muons, noise, etc. We could also add a function in which you can select the type of particle to iterate on, something like data_object.iterate(particle_type), which makes selecting the particle more generic and hopefully the code too can be more generalised using this.

LeanderFischer commented 3 months ago

I'm not sure I grasp the scope of this and whether it's still important :thinking: