snat_sim.utils.filters

The filters module is responsible for registering custom filter profiles with the sncosmo package. When registering filters for a given survey, please check the documentation of the corresponding function to determine the names of the newly registered filters. Filters only need to be registered once within a given runtime to be accessible by sncosmo.

Usage Example

In the below example, filter profiles for the Legacy Survey of Space and Time (LSST) are registered with and then retrieved from the sncosmo package.

>>> import sncosmo
>>> from snat_sim.utils.filters import register_lsst_filters

>>> # Check the names of new filters that will be registered
>>> help(register_lsst_filters)
Help on function register_lsst_filters in module snat_sim.utils.filters:

register_lsst_filters(force: bool = False) -> None
    Register LSST filter scripts, hardware responses, and fiducial ATM with sncosmo

    Registered Filters:
        - lsst_detector: Detector sensitivity defined in the LSST SRD
        - lsst_atmos_10: Fiducial atmosphere over a 10 year baseline
        - lsst_atmos_std: Fiducial atmosphere likely for LSST at 1.2 airmasses
        - lsst_filter_<ugrizy>: Throughput of the glass filters only
        - lsst_hardware_<ugrizy>: Hardware contribution response curve in each band
        - lsst_total_<ugrizy>: Total response curve in each band
        - lsst_m<123>: Response curve contribution from each mirror
        - lsst_lens<123>: Response curve contribution from each lens
        - lsst_mirrors: Combined result from all mirrors
        - lsst_lenses: Combined response from all lenses
        - lsst_<ugrizy>_no_atm: Throughput in each band without a fiducial atmosphere
...

>>> register_lsst_filters(force=True)
>>> lsst_u_band = sncosmo.get_bandpass('lsst_total_u')

Module Docs

snat_sim.utils.filters.register_sncosmo_filter(wave, trans, name, force=False)[source]

Register a filter profile with sncosmo

Parameters:
  • wave (array) – Array of wavelength values in Angstroms

  • trans (array) – Array of transmission values between 0 and 1

  • name (str) – Name of the filter to register

  • force (bool) – Whether to overwrite an existing filter with the given name

Return type:

None

snat_sim.utils.filters.register_decam_filters(force=False)[source]

Register DECam filter scripts, CCD response, and fiducial ATM with sncosmo

Registered Filters:
  • DECam_<ugrizY>_filter: DECam optical response curves

  • DECam_atm: Fiducial atmosphere assumed for the optical response curves

  • DECam_ccd: DECam CCD Response curve

Parameters:

force (bool) – Re-register bands even if they are already registered

Return type:

None

snat_sim.utils.filters.register_lsst_filters(force=False)[source]

Register LSST filter scripts, hardware responses, and fiducial ATM with sncosmo

Registered Filters:
  • lsst_detector: Detector sensitivity defined in the LSST SRD

  • lsst_atmos_10: Fiducial atmosphere over a 10 year baseline

  • lsst_atmos_std: Fiducial atmosphere likely for LSST at 1.2 airmasses

  • lsst_filter_<ugrizy>: Throughput of the glass filters only

  • lsst_hardware_<ugrizy>: Hardware contribution response curve in each band

  • lsst_total_<ugrizy>: Total response curve in each band

  • lsst_m<123>: Response curve contribution from each mirror

  • lsst_lens<123>: Response curve contribution from each lens

  • lsst_mirrors: Combined result from all mirrors

  • lsst_lenses: Combined response from all lenses

  • lsst_<ugrizy>_no_atm: Throughput in each band without a fiducial atmosphere

Parameters:

force (bool) – Re-register bands even if they are already registered

Return type:

None