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

Add fields defined in CTAO DL0 and R1 data models #2338

Merged
merged 7 commits into from Aug 28, 2023
Merged

Add fields defined in CTAO DL0 and R1 data models #2338

merged 7 commits into from Aug 28, 2023

Conversation

maxnoe
Copy link
Member

@maxnoe maxnoe commented May 26, 2023

No description provided.

@maxnoe maxnoe changed the title Add fields defined in CTAO DL0 data model to DL0CameraContainer Add fields defined in CTAO DL0 and R1 data models May 26, 2023
@maxnoe maxnoe force-pushed the ctao_dl0 branch 2 times, most recently from ccf3df5 to 2cab3be Compare May 26, 2023 11:56
ctapipe/containers.py Outdated Show resolved Hide resolved
ctapipe/containers.py Show resolved Hide resolved
@maxnoe maxnoe requested a review from watsonjj as a code owner May 31, 2023 14:18
@maxnoe maxnoe force-pushed the ctao_dl0 branch 2 times, most recently from ed93d63 to 9d2754d Compare June 2, 2023 10:12
kosack
kosack previously approved these changes Jun 2, 2023
# unset dvr bits for removed pixels
dl0_pixel_status[~signal_pixels] &= ~np.uint8(PixelStatus.DVR_STATUS)

event.dl0.tel[tel_id] = DL0CameraContainer(
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a somewhat unrelated improvement. Instead of relying on that the first access of a non-existing container will default initialize it (as Map behaves like a defaultdict), we explicitly create the new container.

This is more efficient (since the defaults don't have to be created before they are overwritten with the actual values) and less error prone (because you can't by accident "inherit" values from before).

See some discussion in #2084

Pixel status information

See DL0 Data Model specification:
https://redmine.cta-observatory.org/dmsf/files/17552/view
Copy link
Member Author

Choose a reason for hiding this comment

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

Most people developing ctapipe will have access to it and it is the official source for these definitions. I think not including it for reference is worse.

ctapipe/io/simteleventsource.py Show resolved Hide resolved
ctapipe/containers.py Show resolved Hide resolved
ctapipe/calib/camera/calibrator.py Show resolved Hide resolved
@maxnoe maxnoe merged commit f16dc47 into main Aug 28, 2023
11 of 12 checks passed
@maxnoe maxnoe deleted the ctao_dl0 branch August 28, 2023 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants