EffectiveApertureInstrument¶
- class nyx.instrument.effective_aperture.EffectiveApertureInstrument[source]¶
Bases:
InstrumentModelAn instrument whose pixels have a centre, a throughput weight and a bandpass.
The response is a fixed table on a shared
PixelLattice, as produced by an iactrace ray-tracing scan. Build one withfrom_iactrace_table()from a saved scan, orfrom_iactrace()to scan from scratch.Trainable in
efficiency,pixel_efficiency,shiftandrotation, the last two per observation, and inmisalignment_lonandmisalignment_latwhen that option is switched on. The forward model usesefficiency * pixel_efficiency[i], so the first two are degenerate: freeze one before fitting for a unique MLE.Build the instrument.
- Parameters:
geo (Geometry)
bandpass (callable) – Maps a wavelength Quantity to transmission.
grid (array-like, shape (n_pixels, 2, grid_dim), or PixelLattice) – Pixel sub-grid coordinates in radians, from which the shared response lattice is recovered; or that lattice directly.
values (array-like, shape (n_pixels, grid_dim, grid_dim)) – Pixel response at the sub-grid points, of the aligned optics.
misalignment (float, pair of floats, or None) – Initial facet tilt RMS in arcseconds, one value or one per axis as
[lon, lat].Nonemeans no misalignment.
Attributes Summary
Spectral transmission curve, shape
(n_wvl,), excluding efficiency.Misalignment blur width in lattice nodes,
[lon, lat], orNone.Pixel centres in the offset frame, shape
(n_pix, 2); precomputed.Per-pixel response sample coordinates, shape
(n_pix, 2, grid_dim).Pixel response values, shape
(n_pix, grid_dim, grid_dim).Simpson-integrated pixel weight, shape
(n_pix,).Methods Summary
corrected_pm(pm)Pointing matrix corrected for shift and rotation.
from_iactrace(geo, telescope, camera, *, ...)Build an instrument by ray-tracing an iactrace telescope and camera.
from_iactrace_table(geo, table, *[, ...])Build an instrument from an already-scanned effective-aperture table.
project_catalog(source_coords, source_fluxes)Project point sources onto pixels, blurred by any misalignment.
project_diffuse(hp_values, pm)Sample a band-integrated HEALPix sky at each pixel.
project_scattered(eval_grid_values)Sample the FOV scattering grid at each pixel.
Attributes Documentation
- bandpass¶
Spectral transmission curve, shape
(n_wvl,), excluding efficiency.
- bandpass_values = <dataclasses._MISSING_TYPE object>¶
- blur¶
Misalignment blur width in lattice nodes,
[lon, lat], orNone.
- centers¶
Pixel centres in the offset frame, shape
(n_pix, 2); precomputed.
- efficiency = <dataclasses._MISSING_TYPE object>¶
- grid¶
Per-pixel response sample coordinates, shape
(n_pix, 2, grid_dim).
- lattice = <dataclasses._MISSING_TYPE object>¶
- misalignment_lat = <dataclasses._MISSING_TYPE object>¶
- misalignment_lon = <dataclasses._MISSING_TYPE object>¶
- pixel_efficiency = <dataclasses._MISSING_TYPE object>¶
- pixel_values¶
Pixel response values, shape
(n_pix, grid_dim, grid_dim).
- rotation = <dataclasses._MISSING_TYPE object>¶
- shift = <dataclasses._MISSING_TYPE object>¶
- weight¶
Simpson-integrated pixel weight, shape
(n_pix,).
Methods Documentation
- classmethod from_iactrace(geo, telescope, camera, *, half_angle, step, wvls, window=None, chunk_size=256, progress=False, misalignment=None, **scan_kwargs)[source]¶
Build an instrument by ray-tracing an iactrace telescope and camera.
Needs the optional
nyx[iactrace]dependency.- Parameters:
geo (Geometry)
telescope (iactrace.Telescope)
camera (iactrace.Camera)
half_angle (float) – Half-width of the field to scan, in radians; must clear the camera radius over the focal length.
step (float) – Field-angle lattice spacing, in radians; around an eighth of the angular pixel pitch resolves a pixel response.
wvls (array-like) – Wavelength grid in nm the bandpass is tabulated on.
window (int or None) – Side length of each pixel’s response window, in nodes;
Nonemeasures it.chunk_size (int) – Field directions traced per render call.
progress (bool) – Whether to print scan progress to stderr.
misalignment (float, pair of floats, or None) – Initial facet blur model in arcseconds.
**scan_kwargs – Anything else
iactrace.analysis.effective_aperture()takes.
- Return type:
- classmethod from_iactrace_table(geo, table, *, misalignment=None)[source]¶
Build an instrument from an already-scanned effective-aperture table.
- Parameters:
geo (Geometry)
table (path-like or EffectiveApertureTable) – A
.npzfile written byiactrace.io.save_aperture_table.misalignment (float, pair of floats, or None) – Initial facet tilt RMS in arcseconds.
- Return type:
- project_catalog(source_coords, source_fluxes)[source]¶
Project point sources onto pixels, blurred by any misalignment.
- __init__(geo, bandpass, grid, values, *, misalignment=None)[source]¶
Build the instrument.
- Parameters:
geo (Geometry)
bandpass (callable) – Maps a wavelength Quantity to transmission.
grid (array-like, shape (n_pixels, 2, grid_dim), or PixelLattice) – Pixel sub-grid coordinates in radians, from which the shared response lattice is recovered; or that lattice directly.
values (array-like, shape (n_pixels, grid_dim, grid_dim)) – Pixel response at the sub-grid points, of the aligned optics.
misalignment (float, pair of floats, or None) – Initial facet tilt RMS in arcseconds, one value or one per axis as
[lon, lat].Nonemeans no misalignment.
- static __new__(cls, *args, **kwargs)¶