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

change internal looping in NuRadioMC #208

Merged
merged 223 commits into from Sep 8, 2020
Merged

change internal looping in NuRadioMC #208

merged 223 commits into from Sep 8, 2020

Conversation

cg-laser
Copy link
Collaborator

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.

@cg-laser cg-laser requested a review from daniel-zid May 19, 2020 15:58
@daniel-zid
Copy link
Collaborator

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.

Copy link
Collaborator Author

@cg-laser cg-laser left a 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)
Copy link
Collaborator

@christophwelling christophwelling left a 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

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

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?

Copy link
Collaborator Author

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

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?

Copy link
Collaborator Author

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.

@cg-laser cg-laser merged commit 5bc1d38 into master Sep 8, 2020
@cg-laser cg-laser deleted the internal-looping branch December 14, 2020 11:35
cg-laser pushed a commit that referenced this pull request Mar 24, 2021
i made the format of the amp response the same as in the other experiments. comments a clearer now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants