Improve pointing offset report output and add summary statistics export#19
Merged
Yong2Sheng merged 1 commit intodevelopfrom Mar 18, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR expands the pointing report output for
VIRTPointingReportby improving the Markdown table generated inget_offset_form()and by adding a new method,get_offset_statistics(), to summarize the pointing offset distribution across all input FITS files.What changed
1.
get_offset_form()now supports a configurable output directoryAdded a new parameter:
Behavior:
saving_diris not provided, the report is still saved next to the FITS files, which preserves the previous default behavior.saving_diris provided, the Markdown report is written there instead.This makes the method easier to use in notebooks, pipelines, and future automated reporting workflows.
2. Improved offset table headers and formatting
The generated Markdown table now uses more explicit column names:
FileRequested CenterFOV CenterRA Error [hms]Dec Error [dms]Separation [deg]Compared with the previous version, this makes the meaning and units of each column clearer.
In addition, the angular separation is now formatted explicitly with fixed precision:
f"{sep.value:.5f}"This makes the output table more consistent and easier to read.
3. Offset values are now stored on the instance
While generating the table in
get_offset_form(), the code now stores:self.draself.ddecself.sepThese cached values are then reused by the new summary-statistics method.
This avoids recomputing offsets later and provides a clean bridge between the per-image report and the statistical summary.
4. Added
get_offset_statistics()This PR adds a new method:
This method:
Angleobjects,ddof=1),The statistics table currently reports:
RA Error Mean ± 1σ [hms]Dec Error Mean ± 1σ [dms]Separation Mean ± 1σ [deg]Why this change is useful
Previously, the class only produced a per-image offset table. That is useful for inspection, but it is harder to quickly evaluate the overall pointing performance of a whole dataset.
With this PR, the report now supports two complementary levels of output:
get_offset_form()get_offset_statistics()This is especially useful for engineering reports, routine QA, and tracking pointing performance over a night or observing run.
Notes
get_offset_statistics()relies on the offset values populated byget_offset_form(), soget_offset_form()should be called first.saving_diris not specified.Example usage
Or with a custom output directory: