nu-radio / NuRadioMC

A Monte Carlo simulation package for radio neutrino detectors
GNU General Public License v3.0
33 stars 35 forks source link

Add mattak iterator to readRNOGDataMattak #691

Closed CamphynR closed 3 months ago

CamphynR commented 3 months ago

This PR adds the mattak dataset iterator to readRNOGDataMattak to load data in batches in the run() function. The batch size can be set by the max_in_mem parameter.

fschlueter commented 3 months ago

@CamphynR what do you think if we slightly rewrite the function set_selectors to add_selectors? Instead of setting self._selectors one would add selectors to the internal list and use this one to pass to iterate.

CamphynR commented 3 months ago

I'm not sure I understand the benefit of doing that. Do you want to bypass the _select_events function?

fschlueter commented 3 months ago

@CamphynR I took the liberty to push some changes to this PR. I have to apologies, my previous comment was confusing because I forgot what select_event actually does...

fschlueter commented 3 months ago

Okay, I think I found a slightly simpler solution. Now the new meta_selector is not needed because the logging is done in select_events. I actually do not have time to test it. Would you?

CamphynR commented 3 months ago

Sure, I moved some logging and initialized the empty selectors list in begin, this should pass the tests