API Reference

The main user facing code of this package with the function to infer the filter info

infer_filter_info.infer_filter_info.infer_filter_info(filter_name: str, telescope: str = None, instrument: str = None, obs_type: str = 'uvoir', uvoir_defaults: UvoirFilter = None, radio_defaults: RadioFilter = None, xray_defaults: XrayFilter = None, out_wave_unit: Unit = Unit("Angstrom")) -> (<class 'astropy.units.quantity.Quantity'>, <class 'numpy.ndarray'>)[source]

Infer information about an astronomical photometric filter based on the filter name, telescope (optionally), and instrument (optionally). If the filter is not recognized or the telescope/instrument are not provided then we will assume the defaults defined in util.FILTER_DEFAULTS.

Parameters:
  • filter_name (str) – The filter name. For example, “r” or “g” or “V”. This can also handle non-UV/Optical/IR filters (like radio bands). See the obs_type keyword.

  • telescope (str) – The telescope name. This should be case insensitive.

  • instrument (str) – The instrument name. This should also be case insensitive.

  • obs_type (str) – Either “uvoir” for UV/Optical/IR filters, in which we will rely on the SVO Filter Profile Service, or “radio”, or “xray”.

  • uvoir_defaults (UvoirFilterMapping) – The class with the default mappings for UV/Optical/IR. Default is the default mappings.

  • radio_defaults (RadioFilterMapping) – The class with the default mappings for Radio bands. Default is the default mappings.

  • xray_defaults (XrayFilterMapping) – The class with the default mappings for UV/Optical/IR. Default is the default mappings.

  • out_wave_unit (astropy.units.Unit) – An astropy wavelength or frequency unit

Returns:

A tuple of a float with the effective wavelength and the transmission curve as a 2 dimensional numpy array (first column is wavelength, second is transmission).

Some utility functions and variables called throughout

class infer_filter_info.filter_mappings.Filter(filter_name: str, telescope: str = None, instrument: str = None, out_wave_unit: Unit = Unit('Angstrom'))[source]

Bases: object

get_central_wave()[source]
get_sens()[source]
infer_instrument()[source]
infer_telescope()[source]
infer_telescope_instrument()[source]
property instrument
property svo_filter_id
property telescope
class infer_filter_info.filter_mappings.RadioFilter(filter_name: str, telescope: str = None, out_wave_unit: Unit = Unit('Angstrom'))[source]

Bases: Filter

get_central_wave()[source]
get_sens(n=100)[source]
infer_telescope()[source]
class infer_filter_info.filter_mappings.UvoirFilter(filter_name: str, telescope: str = None, instrument: str = None, out_wave_unit: Unit = Unit('Angstrom'))[source]

Bases: Filter

get_central_wave()[source]
get_sens()[source]
infer_instrument() str[source]

This infers an instrument from a combination of the filter_name and telescope

Parameters:
  • filter_name (str) – A string of the filter name

  • telescope (str) – A string for the telescope name

Returns:

The inferred instrument name for querying the SVO FPS

infer_telescope() str[source]

This infers a telescope from a combination of the filter_name and instrument

Parameters:
  • filter_name (str) – A string of the filter name

  • instrument (str) – A string for the telescope name

Returns:

The inferred telescope name for querying the SVO FPS

infer_telescope_instrument()[source]

This infers the UVOIR telescope and instrument just based on the filter name

class infer_filter_info.filter_mappings.XrayFilter[source]

Bases: Filter

Custom exceptions for the infer_filter_info package

exception infer_filter_info.exceptions.InvalidObsTypeError[source]

Bases: Exception

Exception thrown when the user passes an invalid obs_type

exception infer_filter_info.exceptions.MissingDefaultError[source]

Bases: Exception