Skip to content

Conversation

@TjarkMiener
Copy link
Member

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.

Copy link

Copilot AI left a 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.py that implements the tool for overwriting is_valid flags
  • 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.

TjarkMiener and others added 7 commits November 15, 2025 17:45
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>
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.

2 participants