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
change internal looping in NuRadioMC #208
Conversation
It looks alright to me. We should now change the input generation files in the 06_webinar example and remove the functions in inelasticities.py that calculated the tau branching. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to http://docs.h5py.org/en/stable/strings.html this is the better way of encoding string data sets. Then no special attention needs to be done when reading in the data sets, in particular the as_string
encoding in simulation.py can be removed (will be done in a future commit)
…er. The ARZ and Alvarez2009 module accept a variable as input that specifies the shower realization. All modules can return a dictionary with additional information (which is used to return the information about which random shower was selected)
…ation of detector simulation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, as far as I can see. Though I have to admit that I don't understand every detail of the simulation
NuRadioMC/EvtGen/generator.py
Outdated
# Initialising data_sets_fiducial with empty values | ||
for key, value in data_sets.items(): | ||
data_sets_fiducial[key] = [] | ||
data_sets["event_group_ids"] = np.arange(i_batch * max_n_events_batch, i_batch * max_n_events_batch + n_events_batch) + start_event_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this generate floats instead of integers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch. I changed it
# import confuse | ||
logger = logging.getLogger("sim") | ||
|
||
STATUS = 31 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this variable mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I improved the output. We had a lot of into messages via logger.warning which confused people. So I added a new custom "status" message logger.status("")
which is just a big higher than warning but below info.
Refactor veff
i made the format of the amp response the same as in the other experiments. comments a clearer now.
This PR introduces a major change in how the internal looping of NuRadioMC is handled. We change the input files to specify each shower, and the simulation will first loop over all showers of one event(group). This will allow to resimulate events with the ARZ model where the shower realization is random.