luv_finder.mock¶
Synthetic ALMA observations of spectral-line sources via CASA simobserve.
Functions
|
Absolute path to a CASA antenna configuration, by bare name or path. |
|
|
Classes
|
Build a line cube, observe it with |
- class luv_finder.mock.MockObservation(cube_shape=(30, 256, 256), dv='100km/s', freq_center='40GHz', cell='0.25arcsec', sensitivity=None, integration_time=None, fits_filename=None, sources=None, direction='J2000 00h00m00.10 -40d00m00.00', ptg_file=None, alma_config='alma.cycle13.3.cfg', output_folder='output/ms_files', support_folder='support', seed=242, calibrate_snr=True, pointings=None, windows=None, image=True)[source]¶
Build a line cube, observe it with
simobserve, image it, and move the products.- Parameters:
- cube_shape(nchan, ny, nx)
- dv, freq_center, cellstr with units, e.g. “100km/s”, “40GHz”, “0.25arcsec”
- sensitivitystr or float, per-channel rms in Jy (ignored if integration_time given)
- integration_timestr with units, e.g. “8min”
- sourceslist of dict
position(dra, ddec) arcsec east and north; optionalaxis_maj/axis_min, the Gaussian FWHM in arcsec (the model’sbmaj/bmin, default a sigma of one cell), andpa, the major axis’ position angle in degrees east of north (default 0);line{width km/s, mean GHz, snr};continuum{snr, index}, flux densitypropto (nu / freq_center)^index(default 0, flat),snratfreq_center.- alma_configstr
Bare name of a CASA antenna configuration, e.g.
alma.cycle13.3.cfg, resolved from CASA’s own data directory.- calibrate_snrbool
Re-simulate once with the flux rescaled so that each line’s declared
snris its achieved matched-filter S/N. Doubles the runtime.- pointingslist of (dra, ddec), optional
Pointing centres in arcsec east and north of
direction, observed in turn (a mosaic); default one pointing atdirection.- windowslist of dict, optional
Spectral windows
{freq_center, nchan}, each observed by its ownsimobserveof the same sky (its own noise, seedseed + k) and concatenated into one MS; default the cube’s own. The channel width in Hz (dvatfreq_center) and the flux scale are shared.- imagebool
tcleanthe MSs and plot the maps (one window only).
- achieved_snr() list[float][source]¶
Optimal matched-filter S/N of each line source in the simulated data.
Uses the noiseless visibilities as the signal and the noisy weights as the noise model, so this is the expected S/N rather than one noisy draw. The template is the source itself, sqrt(sum_jk w Re[V’]^2), which the filter attains; for a point source it equals the channel-averaged S/N.
- classmethod from_yaml(path: str, grid: dict | str | None = None, **overrides) MockObservation[source]¶
Build from a YAML preset;
gridsets the first source’s geometry (seesource_from_grid()).