QFitsView Tutorial: Loading, Inspecting, and Annotating FITS Files
Overview
QFitsView is a lightweight GUI for viewing and analyzing FITS (Flexible Image Transport System) astronomical images. This tutorial covers practical steps to load FITS files, inspect image data and headers, and add annotations for presentations or analysis.
1. Setup
- Install QFitsView (available for Linux; typically packaged or built from source).
- Prepare a directory with FITS files (.fits, .fit).
2. Loading FITS Files
- Open QFitsView.
- Use File → Open or drag-and-drop a FITS file into the window.
- If a FITS file contains multiple extensions or HDUs, select the desired extension from the popup list.
3. Basic Navigation & Display Controls
- Zoom/Pan: Mouse wheel to zoom, click-and-drag to pan.
- Contrast/Stretch: Adjust image stretch via the histogram or stretch presets (linear, log, sqrt, asinh).
- Colormaps: Change colormap to reveal features (gray, viridis, inferno, etc.).
- Frame Controls: Open multiple frames to compare images side-by-side.
4. Inspecting Image Data
- Pixel Value Readout: Hover or click to see pixel coordinates and value.
- Statistics: Use the statistics tool to get mean, median, standard deviation; select ROI to compute local stats.
- Histogram: Inspect distribution of pixel values; set min/max for display scaling.
- Profiles: Draw a line to plot intensity profile across pixels.
5. Inspecting FITS Headers
- Open the header viewer (often via View → Header or an “HDU” panel).
- Read keywords: OBJECT, DATE-OBS, EXPTIME, TELESCOP, INSTRUME, BUNIT, CRPIXn, CRVALn, CDELTn, FITS WCS keywords.
- Edit or copy header keywords if needed for downstream processing.
6. Basic Image Processing
- Background subtraction: Use local background estimation or median filters where available.
- Smoothing/Filtering: Apply Gaussian blur or median filter to reduce noise.
- Scaling/Normalization: Normalize by exposure time or flat-field frames (if supported).
7. Annotating Images
- Text Labels: Add annotations for object names, scale bars, or measurement notes.
- Markers: Place markers on sources (circles, crosses) with coordinate display.
- Regions/ROIs: Draw boxes, polygons, or circular apertures to highlight or measure areas.
- Save Overlays: Export images with overlays for presentations (PNG, TIFF) or save region files (DS9 region format) if supported.
8. Measurements & Export
- Aperture Photometry: Use circular apertures to measure flux within regions; record background annulus values.
- Centroiding: Compute source centroids for precise position measurements.
- Export Data: Save measured values, region coordinates, or export the displayed image (with current stretch and annotations).
9. Tips & Best Practices
- Use appropriate stretch and colormap to avoid misleading contrast.
- Keep original FITS files unchanged; save annotations/regions separately.
- Cross-check header WCS with external tools when performing astrometry.
- For large datasets automate preprocessing with scripts; use QFitsView for quick inspection.
10. Troubleshooting
- If an HDU doesn’t display, check data dimensions and header integrity.
- For missing WCS, verify CRPIXn/CRVALn/CDELTn and projection keywords (CTYPE).
- Performance issues: downsample large images or increase swap memory.
Date: February 7, 2026
Leave a Reply