orca.transform.cutout
Target photometry with ionospheric-aware search and confusing source masking.
Ported from ExoPipe/cutout.py into the orca package for use with the
Celery pipeline. All pipeline_config imports are replaced by
orca.resources.subband_config.
Attributes
Functions
|
|
|
|
|
Measure flux at source position and find peak within beam + ionospheric padding. |
|
Find all image sets for target cutouts. |
|
Legacy wrapper: returns list of (freq, i_path, v_path) for deep images only. |
|
Extract cutouts for a target from deep and 10min images. |
|
Load targets from CSV. Returns list of (name, coord, detection_stokes, confusers). |
Module Contents
- orca.transform.cutout.robust_measure_flux(data, cutout_wcs, sky_coord, beam_arcsec, freq_mhz, fits_path=None, confusing_sources=None)[source]
Measure flux at source position and find peak within beam + ionospheric padding.
- Parameters:
data – 2D numpy array (cutout pixel data, already in memory)
cutout_wcs – astropy WCS (celestial, 2D) from Cutout2D
sky_coord – SkyCoord of the target
beam_arcsec – Beam FWHM in arcseconds
freq_mhz – Observing frequency in MHz (for ionospheric scaling)
fits_path – Optional path to cutout FITS for CASA imfit
confusing_sources – Optional list of SkyCoord for known confusing sources to mask within one beam FWHM before measurement.
- Returns dict with keys:
src_flux, peak_flux, peak_coord, offset_arcmin, rms, fit_flux, fit_err, method, n_confusers_masked
- orca.transform.cutout.find_all_images(run_dir, fallback_dir=None)[source]
Find all image sets for target cutouts.
- Returns dict with:
‘freq’: float, ‘deep_i’: path, ‘deep_v’: path, ‘snapshots_10min’: list of (i_path, v_path, interval_tag) tuples
Or empty dict if deep pair not found.
- orca.transform.cutout.find_image_pairs(run_dir, fallback_dir=None)[source]
Legacy wrapper: returns list of (freq, i_path, v_path) for deep images only.
- orca.transform.cutout.process_target(run_dir, target_name, coord, sample_name, base_out_dir, detections_dir, fallback_dir=None, detection_stokes='IV', confusing_sources=None)[source]
Extract cutouts for a target from deep and 10min images.
Deep Stokes I: uses confusing source masking if sources specified. 10min Stokes I: uses (10min - deep) difference image — no masking needed. Stokes V: measured directly for both deep and 10min.