Skip to content

Add VIRT pointing diagnostics and visualization module#18

Merged
Yong2Sheng merged 3 commits intodevelopfrom
feature/VIRT_engineering_report
Mar 10, 2026
Merged

Add VIRT pointing diagnostics and visualization module#18
Yong2Sheng merged 3 commits intodevelopfrom
feature/VIRT_engineering_report

Conversation

@Yong2Sheng
Copy link
Copy Markdown
Owner

Summary

This PR adds a new VIRTPointingReport module for routine VIRT pointing diagnostics and visualization.

The module is designed to help inspect FITS images with solved WCS, compare the nominal telescope pointing against the WCS-derived field-of-view center, summarize pointing offsets, and visualize science targets both on individual FITS images and on an all-sky Aitoff map.

What's in here

  • a VIRTPointingReport class to standardize pointing-quality checks for VIRT FITS files
  • a WCS availability check with has_wcs()
  • header-based coordinate extraction with get_skycoord_from_header()
  • FOV-center coordinate calculation from solved WCS with get_fov_center_skycoord()
  • a helper to combine the nominal pointing and WCS-derived image center with get_pointing_and_fov_center()
  • coordinate-offset calculations with get_coord_errors()
  • per-image FITS plotting with overlaid sky coordinates and labels via plot_fits_with_skycoords()
  • a report table generator for pointing offsets via get_offset_form()
  • target-coordinate collection from FITS headers via get_target_coordinates()
  • all-sky Aitoff target visualization via plot_all_targets_aitoff()
  • a custom MissingWCSError exception for missing celestial WCS cases
  • docstrings and cleaned up imports for readability

Motivation

This module collects several small, repetitive pointing-check tasks into one place so that VIRT image inspection becomes more standardized and easier to reuse.

In particular, it helps me quickly answer:

  • does this FITS file have a usable celestial WCS?
  • how far is the solved FOV center from the nominal telescope pointing?
  • what do the pointing and solved center look like directly on the FITS image?
  • where are the distinct observed targets on an all-sky map?

Notes

  • this implementation is currently intended for the VIRT workflow only
  • plotting/annotation currently assumes a fixed celestial-frame (FK5) handling strategy that is acceptable for VIRT routine diagnostics
  • if this code is later generalized to other instruments or more heterogeneous WCS products, the plotting code should be revisited so that annotation coordinates are explicitly transformed into the celestial frame implied by the image WCS

Example use cases

  • generate pointing overlay plots for a batch of solved FITS images
  • produce a Markdown summary table of pointing offsets
  • collect unique targets from OBJRA / OBJDEC
  • visualize all distinct targets on an all-sky Aitoff map

@Yong2Sheng Yong2Sheng merged commit f4cabf3 into develop Mar 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant