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

Adding simulation info to DL1 files #141

Merged
merged 8 commits into from
Jun 21, 2019

Conversation

vuillaut
Copy link
Member

@vuillaut vuillaut commented Jun 17, 2019

This PR only adds simulation infos to DL1 files following the structure in v5 discussed in cta-observatory/ctapipe#1059
Somehow fixes #119 .

As the DL1 structure is still being discussed, I think we can move forward with the simu info part to at least have this info available to create IRFs.

The events table structure stays untouched so the rest of the code will still work without any change.

I also modify the merge script to append the simu info from each merged file.

@vuillaut vuillaut requested a review from misabelber June 17, 2019 16:29
@vuillaut
Copy link
Member Author

This will allow to go further and e.g. avoid requiring simtel files for the sensitivity calculation.
This can be done in another PR after changes from #133 have been merged.

Copy link
Collaborator

@misabelber misabelber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Thomas! I'm taking a look at the format and dl1 seems to be fine, I could read the mc data without problem. However, I ran lst-recopipe to check how the format is inherited in the dl2 file and I'm finding a weird structure. When I walk through the groups of the dl2 file like this:
f1 = tables.open_file(dl2_file)
for group in f1.walk_groups():
print(group)

I obtain this list:
/ (RootGroup) ''
/events (Group) ''
/simulation (Group) ''
/events/LSTCam (Group) ''

Shouldn't the last one have been erased before writing it to the dl2 file?

@vuillaut
Copy link
Member Author

Hi

Hi Thomas! I'm taking a look at the format and dl1 seems to be fine, I could read the mc data without problem. However, I ran lst-recopipe to check how the format is inherited in the dl2 file and I'm finding a weird structure. When I walk through the groups of the dl2 file like this:
f1 = tables.open_file(dl2_file)
for group in f1.walk_groups():
print(group)

I obtain this list:
/ (RootGroup) ''
/events (Group) ''
/simulation (Group) ''
/events/LSTCam (Group) ''

Shouldn't the last one have been erased before writing it to the dl2 file?

Hi @misabelber,

What do you mean the last one should be erased?
events is just a node with here only the LSTCam node inside as usual.
events/LSTCam contains the DL2 table (same as the DL1 table + the reconstructed fields from the reco dl1 to dl2).

@misabelber
Copy link
Collaborator

Ahhh, ok, nevermind then, I was misunderstanding the structure. In that case, no problem!

@vuillaut vuillaut merged commit 4407d96 into cta-observatory:master Jun 21, 2019
@vuillaut vuillaut deleted the simu_info branch April 24, 2020 13:54
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.

Metadata header for dl1 and dl2 data
2 participants