Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jllanfranchi opened this issue May 11, 2017 · 2 comments
Open

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

jllanfranchi opened this issue May 11, 2017 · 2 comments

Comments

@jllanfranchi
Copy link
Contributor

@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.

  • Possibly rename Data to Events, replacing the Events object. (That name seems more general, since data is a very specific thing, while Events can include noise, muons, background, MC, etc., etc. and data.
  • We want to ensure access to events is one level and accessing properties for events is two levels of hierarchy within the object (vs. the 3 levels for the Events object (events[flav][int])... which just has a veneer of 2-level indexing but this doesn't generalize well at all now)
  • Might be a good time to make NuFlavInt* work with muons, noise, (background), ... etc.; OR create a higher-level parser (or class?) that can deal with the various categories of things we might have in our data.

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

@ShiveshM
Copy link

ShiveshM commented May 11, 2017

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants