orca.transform.ionospheric_dewarping
Ionospheric dewarping via VLSSr cross-match.
Ported from ExoPipe/extractor_pb_75.py into the orca package.
Computes pixel-level warp screens by cross-matching extracted LWA sources against the VLSSr catalog and interpolating positional offsets over the full image grid using scipy.interpolate.griddata.
Functions
- parse_vlssr_text
Parse the OVRO-LWA VLSSr text catalog into a dict.
- load_ref_catalog
Load a reference catalog (FITS or VLSSr text format).
- generate_warp_screens
Build 2-D warp screens from LWA↔catalog cross-match.
- apply_warp
Apply pre-computed warp screens to an image array.
Attributes
Functions
|
Parse the OVRO-LWA VLSSr text catalog. |
|
Load a reference catalog (FITS table or VLSSr text). |
|
Build 2-D ionospheric warp screens from LWA↔catalog cross-match. |
|
Apply pre-computed warp screens to an image array. |
Module Contents
- orca.transform.ionospheric_dewarping.parse_vlssr_text(path)[source]
Parse the OVRO-LWA VLSSr text catalog.
The text format has columns: RAh RAm RAs DECd DECm DECs … flux … where flux is in Jy and positions are sexagesimal.
- Parameters:
path – Path to the VLSSr text file.
- Returns:
Dict with keys ‘coords’, ‘flux’, ‘maj’, ‘ra’, ‘dec’, ‘type’, or None on failure.
- orca.transform.ionospheric_dewarping.load_ref_catalog(path, name='VLSSr')[source]
Load a reference catalog (FITS table or VLSSr text).
- Parameters:
path – Filesystem path to the catalog.
name – Catalog name (used to identify format).
- Returns:
Dict with keys ‘coords’, ‘flux’, ‘maj’, ‘ra’, ‘dec’, ‘type’, or None on failure.
- orca.transform.ionospheric_dewarping.generate_warp_screens(img_sources, cat_data, wcs_obj, shape, freq_mhz, cat_freq_mhz, lwa_bmaj_deg, clip_sigma, base_name='')[source]
Build 2-D ionospheric warp screens from LWA↔catalog cross-match.
- Parameters:
img_sources – DataFrame with columns ‘ra’, ‘dec’, ‘flux_peak_I_app’, optionally ‘maj’.
cat_data – Dict from
load_ref_catalog().wcs_obj –
astropy.wcs.WCS(celestial) of the reference image.shape – (ny, nx) of the image.
freq_mhz – Observing frequency (MHz).
cat_freq_mhz – Reference catalog frequency (MHz), e.g. 74.
lwa_bmaj_deg – Beam FWHM of the LWA image (degrees).
clip_sigma – Sigma-clipping threshold (not currently applied — kept for API compatibility).
base_name – Prefix for diagnostic file names.
- Returns:
Tuple
(screen_x, screen_y, anchors_diag, raw_coords)where screens are 2-D arrays of pixel offsets, or(None, None, None, None)on failure.
- orca.transform.ionospheric_dewarping.apply_warp(data, screen_x, screen_y)[source]
Apply pre-computed warp screens to an image array.
- Parameters:
data – 2-D numpy array of image pixels.
screen_x – X-offset screen (same shape as data).
screen_y – Y-offset screen (same shape as data).
- Returns:
Dewarped 2-D array, or None on shape mismatch.