synthesizer.instruments.integrated_field_unit¶
Specialised Integrated Field Unit instrument.
This instrument is designed to hold the attributes required by resolved
spectroscopy. It extends SpectroscopicInstrument with spatial
resolution, optional PSFs, and noise definitions.
Cube noise uses the noise models of SpectroscopicInstrument, with
each spatial pixel of the cube an independent spectrum.
Classes
- class synthesizer.instruments.integrated_field_unit.IntegratedFieldUnit(label, lam, resolution, psfs=None, psf_pixel_scale=None, depth=None, depth_app_radius=None, snrs=None, noise_maps=None, noise_source_maps=None, resolving_power=None, lsfs=None, psf_lam=None, noise_shape_lam=None, noise_shape_std=None, template_on_detector=True, depth_lam=None, depth_window=None)[source]¶
Integrated Field Unit instrument class.
A class containing the attributes and methods required to produce resolved spectroscopy. It extends
SpectroscopicInstrumentwith spatial resolution, optional PSFs, and noise definitions.- resolution¶
The spatial resolution of the instrument, in kpc or arcseconds.
- Type:
unyt_array
- psfs¶
An optional array with spatial point spread functions as a function of wavelength, in dimensionless units. If a 2D array is supplied, every wavelength is assumed to have the same PSF. If a 3D array is supplied, the last axis must be the wavelength axis.
- Type:
array
- psf_lam¶
Input wavelength grid of the PSF slices. Wavelength-dependent PSFs are interpolated onto
lamduring initialisation. Defaults tolamwhen not explicitly supplied.- Type:
unyt_array
- lsfs¶
Normalised line spread function kernels with shape (nwave, nkernel), inherited from SpectroscopicInstrument. Each row corresponds to a wavelength in lam.
- Type:
array, optional
- noise_shape_lam, noise_shape_std, template_on_detector
The noise template settings, inherited from SpectroscopicInstrument.
- depth_lam, depth_window
Where the depth applies, inherited from SpectroscopicInstrument.
- depth_app_radius¶
The aperture radius for the depth. If set, depth / snrs is the noise in the aperture and is converted to per pixel; otherwise it is the noise per pixel.
- Type:
unyt_quantity, optional
- apply_noise(observable, **kwargs)[source]¶
Apply IFU noise to an observable.
- Parameters:
observable – Observable to which IFU noise should be applied.
**kwargs – Additional arguments passed to the noise method.
- Returns:
Cube with noise applied.
- Return type:
- Raises:
InconsistentArguments – If the observable is not a SpectralCube.
- apply_noise_to_cube(cube, rng_seed=None, inplace=False, simspin_snr=None)[source]¶
Apply IFU noise to a spectral cube.
The noise follows the SimSpin calculation if simspin_snr is given, otherwise from the provided noise maps (a fixed realisation added as it is), or calculated from the depth and SNR. For depth+SNR and SimSpin noise each spatial pixel is an independent spectrum, with noise from the noise models of SpectroscopicInstrument. For depth+SNR noise with depth_app_radius set, the depth is an aperture depth and the noise is converted to per pixel.
- Parameters:
cube (SpectralCube) – Spectral cube to which noise should be applied.
rng_seed (int, optional) – Seed for the noise realisation. None gives a fresh realisation.
inplace (bool) – If
Trueupdatecubedirectly and return it. Otherwise return a new cube.simspin_snr (float, optional) – The S/N of the median-flux pixel for SimSpin noise.
- Returns:
- Cube with noise applied, with noise_arr (the noise
added, unyt_array) and weight_map (the inverse variance of each voxel; 0 where it is undefined) attached.
- Return type:
- Raises:
MissingIFU – If the cube has not been generated.
MissingArgument – If there is no noise model to apply.
InconsistentArguments – If the cube has no units, or the noise maps don’t match the cube.
UnimplementedFunctionality – If noise source maps are set.
- apply_psf(observable, **kwargs)[source]¶
Apply the IFU PSF to an observable.
- Parameters:
observable – Observable to which the IFU PSF should be applied.
**kwargs – Additional arguments passed to the PSF method.
- Returns:
Cube with the PSF applied.
- Return type:
- Raises:
InconsistentArguments – If the observable is not a SpectralCube.
- apply_psf_to_cube(cube, inplace=False)[source]¶
Apply the IFU PSF to a spectral cube.
Wavelength-dependent PSFs are interpolated onto the instrument wavelength grid during initialisation.
- Parameters:
cube (SpectralCube) – Spectral cube to which the PSF should be applied.
inplace (bool) – If
Trueupdatecubedirectly and return it. Otherwise return a new cube.
- Returns:
New cube with the PSF applied.
- Return type:
- Raises:
MissingArgument – If the instrument has no PSFs configured.
InconsistentArguments – If the PSF dimensions or wavelength grid are incompatible with the instrument.
- property can_do_noisy_resolved_spectroscopy¶
Return whether this instrument supports noisy IFU work.
- property can_do_noisy_spectroscopy¶
Return whether this instrument adds noise to integrated spectra.
An IFU’s depth, SNR and noise maps describe the noise per spaxel of a spectral cube, not of an integrated spectrum, so integrated spectroscopy with an IFU is noiseless. Cube noise is applied with apply_noise_to_cube (or apply_noise on a SpectralCube).
- property can_do_psf_spectroscopy¶
Return whether this instrument supports PSF spectroscopy.
- property can_do_resolved_spectroscopy¶
Return whether this instrument supports resolved spectroscopy.
- generate_data_cube(component, fov, sed, cube_type='smoothed', kernel=None, kernel_threshold=1, quantity='lnu', nthreads=1, cosmo=None)[source]¶
Generate a resolved-spectroscopy data cube for one saved spectrum.
This method is the instrument-owned entry point for IFU cube generation. It determines which component owns the requested saved spectrum and then constructs the data cube directly using the relevant low-level cube-generation path.
- Parameters:
component (Component) – Component providing the geometry used to construct the data cube.
fov (unyt_quantity) – Width of the requested data cube.
sed (Sed) – Saved spectra to turn into a data cube.
cube_type (str) – Either
"smoothed"or"hist".kernel (array-like, optional) – Kernel used for smoothed particle cubes.
kernel_threshold (float) – Kernel impact-parameter threshold.
quantity (str) – Spectral quantity to store in the cube.
nthreads (int) – Number of threads to use for particle cube generation.
cosmo (astropy.cosmology, optional) – Cosmology used for mixed-unit conversions.
- Returns:
Generated spectral data cube.
- Return type:
- property instrument_type¶
Return the serialised type tag for this instrument.