synthesizer.instruments.premade

A submodule defining some premade instruments.

This module contains a set of commonly used instruments which can be imported, instantiated, and used directly. Each premade single-instrument class is a specialised PhotometricImager with the appropriate filters, resolution, and cached metadata fixed for that observatory or camera.

The premade instruments are:
  • JWST/NIRCam.Wide

  • JWST/NIRCam.Medium

  • JWST/NIRCam.Narrow

  • JWST/NIRCam

  • JWST/MIRI

  • HST/WFC3.UVIS.Wide

  • HST/WFC3.UVIS.Medium

  • HST/WFC3.UVIS.Narrow

  • HST/WFC3.UVI

  • HST/WFC3.IR.Wide

  • HST/WFC3.IR.Medium

  • HST/WFC3.IR.Narrow

  • HST/WFC3.IR

  • HST/ACS_WFC.Wide

  • HST/ACS_WFC.Medium

  • HST/ACS_WFC.Narrow

  • HST/ACS_WFC

  • Euclid/NISP

  • Euclid/VIS

Example usage:

# Get NIRCam Wide instrument jwst_nircam = JWSTNIRCam()

# Get MIRI with a custom wavelength array miri = JWSTMIRI(filter_lams=lams)

# Get HST WFC3 UVIS with a custom depth wfc3_uvis = HSTWFC3UVISWide(depth=30.0, snrs=10.0)

# Get HST WFC3 IR with a subset of filters wfc3_ir = HSTWFC3IRWide(filter_subset=

[

“HST/WFC3.IR.F110W”, “HST/WFC3.IR.F160W”,

]

)

# Load a premade instrument from a file jwst_nircam = JWSTNIRCam.load()

# Load a premade instrument from a file with a custom wavelength array jwst_nircam = JWSTNIRCam.load(filter_lams=lams)

# Load a premade instrument from a file with a custom noise array jwst_nircam = JWSTNIRCam.load(noise_maps=noise_arrays)

Premade collection factory classes are also provided for observatories with multiple related instrument groupings.

Classes

class synthesizer.instruments.premade.Euclid(**kwargs)[source]

Factory class returning a Euclid InstrumentCollection.

Contains NISP and VIS instruments.

This allows the following:

from synthesizer.instruments import Euclid euclid = Euclid() for inst in euclid:

print(inst.label, inst.resolution)

which would return:

Euclid.NISP 0.3 arcsec Euclid.VIS 0.1 arcsec

For further details see PremadeInstrumentCollectionFactory.

class synthesizer.instruments.premade.EuclidNISP(label='Euclid.NISP', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing the properties of Euclid’s NISP instrument.

Default label: “Euclid.NISP”

Resolution: 0.30”

Available filters:
  • Y

  • J

  • H

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.EuclidVIS(label='Euclid.VIS', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing the properties of Euclid’s VIS instrument.

Default label: “Euclid.VIS”

Resolution: 0.10”

Available filters:
  • VIS

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.GALEX(**kwargs)[source]

Factory class returning a GALEX InstrumentCollection.

Contains FUV and NUV instruments.

This allows the following:

from synthesizer.instruments import GALEX galex = GALEX() for inst in galex:

print(inst.label, inst.resolution)

which would return:

GALEXFUV 6 arcsec GALEXNUV 8 arcsec

For further details see PremadeInstrumentCollectionFactory.

class synthesizer.instruments.premade.GALEXFUV(label='GALEXFUV', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, **kwargs)[source]

A class containing the properties of the GALEX instrument.

Default label: “GALEXFUV”

Resolution: 6”

Available filters:
  • FUV

For further details see PhotometricImager.

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

Load a photometric imager from an HDF5 file.

Parameters:
  • filepath (str or PathLike, optional) – Path to the HDF5 file. If omitted, subclasses may provide a cached default path.

  • **kwargs – Attribute overrides applied after deserialisation.

Returns:

The loaded instrument.

Return type:

PhotometricImager

class synthesizer.instruments.premade.GALEXNUV(label='GALEXNUV', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, **kwargs)[source]

A class containing the properties of the GALEX instrument.

Default label: “GALEXNUV”

Resolution: 8”

Available filters:
  • NUV

For further details see PhotometricImager.

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

Load a photometric imager from an HDF5 file.

Parameters:
  • filepath (str or PathLike, optional) – Path to the HDF5 file. If omitted, subclasses may provide a cached default path.

  • **kwargs – Attribute overrides applied after deserialisation.

Returns:

The loaded instrument.

Return type:

PhotometricImager

class synthesizer.instruments.premade.HST(**kwargs)[source]

Factory class returning a HST InstrumentCollection.

Contains WFC3 UVIS, WFC3 IR, and ACS WFC instruments.

This allows the following:

from synthesizer.instruments import HST hst = HST() for inst in hst:

print(inst.label, inst.resolution)

which would return:

HST.WFC3.UVIS 0.04 arcsec HST.WFC3.IR 0.13 arcsec HST.ACS.WFC 0.05 arcsec

For further details see PremadeInstrumentCollectionFactory.

class synthesizer.instruments.premade.HSTACSWFC(label='HST.ACS.WFC', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing the properties of HST’s ACS/WFC instrument.

Default label: “HST.ACS.WFC”

Resolution: 0.05”

Available filters:
  • F435W

  • F475W

  • F502N

  • F550M

  • F555W

  • F606W

  • F625W

  • F658N

  • F660N

  • F775W

  • F814W

  • F850LP

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.HSTACSWFCMedium(label='HST.ACS.WFC.Medium', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing the properties of HST’s ACS/WFC instrument (Medium).

Default label: “HST.ACS.WFC.Medium”

Resolution: 0.05”

Available filters:
  • F550M

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.HSTACSWFCNarrow(label='HST.ACS.WFC.Narrow', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing the properties of HST’s ACS/WFC instrument (Narrow).

Default label: “HST.ACS.WFC.Narrow”

Resolution: 0.05”

Available filters:
  • F502N

  • F658N

  • F660N

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.HSTACSWFCWide(label='HST.ACS.WFC.Wide', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing the properties of HST’s ACS/WFC instrument (Wide).

Default label: “HST.ACS.WFC.Wide”

Resolution: 0.05”

Available filters:
  • F435W

  • F475W

  • F555W

  • F606W

  • F625W

  • F775W

  • F814W

  • F850LP

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.HSTWFC3IR(label='HST.WFC3.IR', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing the properties of HST’s WFC3/IR instrument.

Default label: “HST.WFC3.IR”

Resolution: 0.13”

Available filters:
  • F098M

  • F105W

  • F110W

  • F125W

  • F126N

  • F127M

  • F128N

  • F130N

  • F132N

  • F139M

  • F140W

  • F153M

  • F160W

  • F164N

  • F167N

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.HSTWFC3IRMedium(label='HST.WFC3.IR.Medium', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing the properties of HST’s WFC3/IR instrument (Medium).

Default label: “HST.WFC3.IR.Medium”

Resolution: 0.13”

Available filters:
  • F098M

  • F127M

  • F139M

  • F153M

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.HSTWFC3IRNarrow(label='HST.WFC3.IR.Narrow', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing the properties of HST’s WFC3/IR instrument (Narrow).

Default label: “HST.WFC3.IR.Narrow”

Resolution: 0.13”

Available filters:
  • F126N

  • F128N

  • F130N

  • F132N

  • F164N

  • F167N

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.HSTWFC3IRWide(label='HST.WFC3.IR.Wide', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing the properties of HST’s WFC3/IR instrument (Wide).

Default label: “HST.WFC3.IR.Wide”

Resolution: 0.13”

Available filters:
  • F105W

  • F110W

  • F125W

  • F140W

  • F160W

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.HSTWFC3UVIS(label='HST.WFC3.UVIS', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing HST’s WFC3/UVIS instrument.

Default label: “HST.WFC3.UVIS”

Resolution: 0.04”

Available filters:
  • F218W

  • F225W

  • F275W

  • F336W

  • F350LP

  • F390W

  • F438W

  • F475W

  • F555W

  • F606W

  • F625W

  • F775W

  • F814W

  • F850LP

  • F410M

  • F467M

  • F547M

  • F621M

  • F689M

  • F763M

  • F845M

  • F280N

  • F343N

  • F373N

  • F395N

  • F469N

  • F487N

  • F502N

  • F631N

  • F645N

  • F656N

  • F657N

  • F658N

  • F665N

  • F673N

  • F680N

  • F953N

  • FQ232N

  • FQ243N

  • FQ378N

  • FQ387N

  • FQ422M

  • FQ436N

  • FQ437N

  • FQ492N

  • FQ508N

  • FQ575N

  • FQ619N

  • FQ634N

  • FQ672N

  • FQ674N

  • FQ727N

  • FQ750N

  • FQ889N

  • FQ906N

  • FQ924N

  • FQ937N

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.HSTWFC3UVISMedium(label='HST.WFC3.UVIS.Medium', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing HST’s WFC3/UVIS instrument (Medium).

Default label: “HST.WFC3.UVIS.Medium”

Resolution: 0.04”

Available filters:
  • F410M

  • F467M

  • F547M

  • F621M

  • F689M

  • F763M

  • F845M

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.HSTWFC3UVISNarrow(label='HST.WFC3.UVIS.Narrow', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing HST’s WFC3/UVIS instrument (Narrow).

Default label: “HST.WFC3.UVIS.Narrow”

Resolution: 0.04”

Available filters:
  • F280N

  • F343N

  • F373N

  • F395N

  • F469N

  • F487N

  • F502N

  • F631N

  • F645N

  • F656N

  • F657N

  • F658N

  • F665N

  • F673N

  • F680N

  • F953N

  • FQ232N

  • FQ243N

  • FQ378N

  • FQ387N

  • FQ422M

  • FQ436N

  • FQ437N

  • FQ492N

  • FQ508N

  • FQ575N

  • FQ619N

  • FQ634N

  • FQ672N

  • FQ674N

  • FQ727N

  • FQ750N

  • FQ889N

  • FQ906N

  • FQ924N

  • FQ937N

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.HSTWFC3UVISWide(label='HST.WFC3.UVIS.Wide', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing HST’s WFC3/UVIS instrument (Wide).

Default label: “HST.WFC3.UVIS.Wide”

Resolution: 0.04”

Available filters:
  • F218W

  • F225W

  • F275W

  • F336W

  • F350LP

  • F390W

  • F438W

  • F475W

  • F555W

  • F606W

  • F625W

  • F775W

  • F814W

  • F850LP

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.JWST(**kwargs)[source]

Factory class returning a JWST InstrumentCollection.

Contains NIRCam, MIRI, and NIRSpec instruments.

This allows the following:

from synthesizer.instruments import JWST jwst = JWST() for inst in jwst:

print(inst.label, inst.resolution)

which would return:

JWST.NIRCam 0.031 arcsec JWST.MIRI 0.11 arcsec JWST.NIRSpec N/A (placeholder)

For further details see PremadeInstrumentCollectionFactory.

class synthesizer.instruments.premade.JWSTMIRI(label='JWST.MIRI', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing JWST’s MIRI instrument.

Default label: “JWST.MIRI”

Resolution: 0.11”

Available filters:
  • F560W

  • F770W

  • F1000W

  • F1065C

  • F1130W

  • F1140C

  • F1280W

  • F1500W

  • F1550C

  • F1800W

  • F2100W

  • F2300C

  • F2550W

If this class is loaded from a file then it will also include PSFs for each filter, derived using WebbPSF (using the defaults arguments).

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.JWSTNIRCam(label='JWST.NIRCam', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing JWST’s NIRCam instrument.

Default label: “JWST.NIRCam”

Resolution: 0.031”

Available filters:
  • F070W

  • F090W

  • F115W

  • F140M

  • F150W

  • F162M

  • F164N

  • F182M

  • F187N

  • F200W

  • F210M

  • F212N

  • F250M

  • F277W

  • F300M

  • F323N

  • F335M

  • F356W

  • F360M

  • F405N

  • F410M

  • F430M

  • F444W

  • F460M

  • F466N

  • F470N

  • F480M

Note that we give every filter the short wavelength channel resolution as if the long wavelength channel has been resampled to match the higher resolution of the short wavelength channel.

If this class is loaded from a file then it will also include PSFs for each filter, derived using WebbPSF (using the defaults arguments).

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.JWSTNIRCamMedium(label='JWST.NIRCam.Medium', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing JWST’s NIRCam instrument (Medium).

Default label: “JWST.NIRCam.Medium”

Resolution: 0.031”

Available filters:
  • F140M

  • F162M

  • F182M

  • F210M

  • F250M

  • F300M

  • F335M

  • F360M

  • F410M

  • F430M

  • F460M

  • F480M

Note that we give every filter the short wavelength channel resolution as if the long wavelength channel has been resampled to match the higher resolution of the short wavelength channel.

If this class is loaded from a file then it will also include PSFs for each filter, derived using WebbPSF (using the defaults arguments).

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.JWSTNIRCamNarrow(label='JWST.NIRCam.Narrow', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing JWST’s NIRCam instrument (Narrow).

Default label: “JWST.NIRCam.Narrow”

Resolution: 0.031”

Available filters:
  • F164N

  • F187N

  • F212N

  • F323N

  • F405N

  • F466N

  • F470N

Note that we give every filter the short wavelength channel resolution as if the long wavelength channel has been resampled to match the higher resolution of the short wavelength channel.

If this class is loaded from a file then it will also include PSFs for each filter, derived using WebbPSF (using the defaults arguments).

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.JWSTNIRCamWide(label='JWST.NIRCam.Wide', filter_lams=None, depth=None, depth_app_radius=None, snrs=None, psfs=None, noise_maps=None, filter_subset=(), **kwargs)[source]

A class containing JWST’s NIRCam instrument (Wide).

Default label: “JWST.NIRCam.Wide”

Resolution: 0.031”

Available filters:
  • F070W

  • F090W

  • F115W

  • F150W

  • F200W

  • F277W

  • F356W

  • F444W

Note that we give every filter the short wavelength channel resolution as if the long wavelength channel has been resampled to match the higher resolution of the short wavelength channel.

If this class is loaded from a file then it will also include PSFs for each filter, derived using WebbPSF (using the defaults arguments).

For further details see PhotometricImager.

classmethod load(filepath=None, filter_subset=(), filter_lams=None, **kwargs)

Load a cached premade imager and apply premade-specific overrides.

This helper is used by premade single-instrument classes which support cached loading from an HDF5 file. The cached instrument is loaded first, then any requested filter subsetting or wavelength-grid overrides are applied before constructing the final premade instrument instance.

Parameters:
  • cls (type) – Premade instrument class being loaded.

  • filepath (str, optional) – Path to the cached instrument file. If not provided, the class-specific cache-file attribute is used.

  • filter_subset (tuple, optional) – Optional subset of filter codes to retain in the loaded instrument.

  • filter_lams (unyt_array, optional) – Optional wavelength array to which the loaded filters should be resampled.

  • **kwargs – Additional keyword arguments forwarded to PhotometricImager._from_hdf5(), such as premade loader overrides supported by the cached instrument machinery.

Returns:

Loaded premade instrument with any requested

subsetting or filter resampling applied.

Return type:

PhotometricImager

class synthesizer.instruments.premade.JWSTNIRSpec(*args, **kwargs)[source]

A placeholder for JWST’s NIRSpec instrument.

This class will be implemented in a future update.

class synthesizer.instruments.premade.PremadeInstrumentCollectionFactory(**kwargs)[source]

Base class for factory classes that create instrument collections.

This class provides a common pattern for creating InstrumentCollection objects that contain multiple related instruments, such as the paired GALEX FUV and NUV configurations.

Child classes should define an instruments class attribute as a dictionary mapping instrument names to instrument classes. Kwargs for individual instruments can be passed as <name>_kwargs.

Example

```python class GALEX(PremadeInstrumentCollectionFactory):

instruments = {

“fuv”: GALEXFUV, “nuv”: GALEXNUV,

}

# Create a GALEX collection with custom kwargs for each instrument galex = GALEX(fuv_kwargs={“depth”: 25.0}, nuv_kwargs={“depth”: 26.0}) ```