Skip to content

Save pixels charge and peak time arrays in 'DL1' h5 tables #2339

Answered by maxnoe
Elisa-Visentin asked this question in Q&A
Discussion options

You must be logged in to vote

The code is something like:

You call the DL1Container, which is a container for all telescopes dl1tel and set one of its members to a DL1CameraContainer.

What you need to pass to the writer is directly the DL1CameraContainer, you need to write it to a table per telescope (or at least per telescope type) due to the fixed length limitation.

So the correct code would look something like this:

dl1_tel = DL1CameraContainer(image=..., peak_time=...)
writer.write((index, dl1_tel), f"dl1/event/telescope/images/tel_{tel_id:03d}")

This is all handled in recent versions of ctapipe in the DataWriter class.

Replies: 8 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@Elisa-Visentin
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Elisa-Visentin
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@kosack
Comment options

@Elisa-Visentin
Comment options

@maxnoe
Comment options

@Elisa-Visentin
Comment options

@kosack
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants