-
Notifications
You must be signed in to change notification settings - Fork 50
Add tool to overwrite is_valid flag #268
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR introduces a new tool OverwriteIsValidFlag to facilitate comparing predictions from different experiments with the same effective area by allowing users to copy is_valid flags from one HDF5 file to another. This is particularly useful for making resolution curves more comparable between telescope designs like current LSTCam and AdvCam.
Key changes include:
- Addition of a new script
overwrite_isvalid_flag.pythat implements the tool for overwritingis_validflags - Standardization of command-line aliases to use hyphens instead of underscores in
append_subarray_table.py - Bug fix for incorrect flag description in
predict_model.py
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| scripts/overwrite_isvalid_flag.py | New tool for overwriting is_valid flags between HDF5 files with configurable reconstruction tasks and telescope filtering |
| scripts/overwrite_table.py | Added module docstring for clarity |
| scripts/append_subarray_table.py | Standardized command-line aliases to use hyphens instead of underscores |
| ctlearn/tools/predict_model.py | Fixed incorrect flag description for dl2-subarray (changed "telescope-event-wise" to "subarray-event-wise") |
Comments suppressed due to low confidence (1)
scripts/overwrite_isvalid_flag.py:6
- Import of 'np' is not used.
import numpy as np
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR adds a tool to overwrite (or better write a new file) with the predictions from one experiment and the is_valid flag from another one. Helpful if you want to make event comparison and compare to telescope designs with the same eff area. E.g. to make resolution curves more comparable between current LSTCam and AdvCam.