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.

Classes

class synthesizer.instruments.integrated_field_unit.IntegratedFieldUnit(label, lam, resolution, psfs=None, psf_resample_factor=1, depth=None, depth_app_radius=None, snrs=None, noise_maps=None, noise_source_maps=None)[source]

Integrated Field Unit instrument class.

A class containing the attributes and methods required to produce resolved spectroscopy. It extends SpectroscopicInstrument with 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

apply_noise(observable, **kwargs)[source]

Apply IFU noise to an observable.

This placeholder makes the intended IFU-owned noise behaviour explicit even though the underlying resolved-spectroscopy noise machinery has not yet been implemented.

Parameters:
  • observable – Observable to which IFU noise should be applied.

  • **kwargs – Future keyword arguments for IFU noise application.

Raises:

UnimplementedFunctionality – Raised because IFU noise application is not yet implemented.

apply_noise_to_cube(cube, **kwargs)[source]

Apply IFU noise to a spectral cube.

This placeholder makes the intended IFU-owned noise behaviour explicit even though the underlying cube-noise machinery has not yet been implemented.

Parameters:
  • cube (SpectralCube) – Spectral cube to which noise should be applied.

  • **kwargs – Future keyword arguments for IFU noise application.

Raises:

UnimplementedFunctionality – Raised because IFU cube noise application is not yet implemented.

apply_psf(observable, **kwargs)[source]

Apply the IFU PSF to an observable.

This placeholder makes the intended IFU-owned PSF behaviour explicit even though the underlying resolved-spectroscopy PSF machinery has not yet been implemented.

Parameters:
  • observable – Observable to which the IFU PSF should be applied.

  • **kwargs – Future keyword arguments for IFU PSF application.

Raises:

UnimplementedFunctionality – Raised because IFU PSF application is not yet implemented.

apply_psf_to_cube(cube, **kwargs)[source]

Apply the IFU PSF to a spectral cube.

This placeholder makes the intended IFU-owned PSF behaviour explicit even though the underlying cube PSF machinery has not yet been implemented.

Parameters:
  • cube (SpectralCube) – Spectral cube to which the PSF should be applied.

  • **kwargs – Future keyword arguments for IFU PSF application.

Raises:

UnimplementedFunctionality – Raised because IFU PSF application is not yet implemented.

property can_do_noisy_resolved_spectroscopy

Return whether this instrument supports noisy IFU work.

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:

SpectralCube

property instrument_type

Return the serialised type tag for this instrument.

classmethod load(filepath, **kwargs)[source]

Load an integrated field unit from an HDF5 file.

Parameters:
  • filepath (str or PathLike) – Path to the HDF5 file.

  • **kwargs – Attribute overrides applied after deserialisation.

Returns:

The loaded instrument.

Return type:

IntegratedFieldUnit

to_hdf5(group)[source]

Write the integrated field unit to an HDF5 group.

Parameters:

group (h5py.Group) – Group into which the instrument should be serialised.