chemicalc.s2n

class chemicalc.s2n.Sig2NoiseQuery

Bases: object

Base class for ETC queries

query_s2n() → None
class chemicalc.s2n.Sig2NoiseWMKO(instrument: str, exptime: float, mag: float, template: str, magtype: str = 'Vega', band: str = 'Cousins_I.dat', airmass: float = 1.1, seeing: float = 0.75, redshift: float = 0)

Bases: chemicalc.s2n.Sig2NoiseQuery

Superclass for WMKO ETC Queries

Parameters
  • instrument (str) – Keck instrument. Must be “DEIMOS”, “LRIS”, “HIRES”, or “ESI”

  • exptime (float) – Exposure time in seconds

  • mag (float) – Magnitude of source

  • template (str) – Spectral template. For valid options see s2n.wmko_options[‘template’].

  • magtype (str) – Magnitude System. Either “Vega” or “AB”

  • band (str) – Magnitude band. For valid options see s2n.wmko_options[‘filter’].

  • airmass (float) – Airmass of observation

  • seeing (float) – Seeing (FWHM) of observation in arcseconds

  • redshift (float) – Redshift of the target

query_s2n() → None

No generic S/N query, see specific instrument subclasses

Returns

class chemicalc.s2n.Sig2NoiseDEIMOS(grating: str, exptime: float, mag: float, template: str, magtype: str = 'Vega', band: str = 'Cousins_I.dat', cwave: str = '7000', slitwidth: str = '0.75', binning: str = '1x1', airmass: float = 1.1, seeing: float = 0.75, redshift: float = 0)

Bases: chemicalc.s2n.Sig2NoiseWMKO

Keck/DEIMOS S/N Query (http://etc.ucolick.org/web_s2n/deimos)

Parameters
  • grating (str) – DEIMOS grating. Must be one of “600Z”, “900Z”, “1200G”, or “1200B”.

  • exptime (float) – Exposure time in seconds

  • mag (float) – Magnitude of source

  • template (str) – Spectral template. For valid options see s2n.wmko_options[‘template’].

  • magtype (str) – Magnitude System. Either “Vega” or “AB”

  • band (str) – Magnitude band. For valid options see s2n.wmko_options[‘filter’].

  • cwave (str) – Central wavelength of grating. Must be one of “5000”, “6000”, “7000”, or “8000”

  • slitwidth (str) – Width of slit in arcseconds. Must be “0.75”, “1.0”, or “1.5”

  • binning (str) – spatial x spectral binning. “1x1” is the only option.

  • airmass (flaot) – Airmass of observation

  • seeing (float) – Seeing (FWHM) of observation in arcseconds

  • redshift (float) – Redshift of the target

query_s2n()

Query the DEIMOS ETC (http://etc.ucolick.org/web_s2n/deimos)

Returns

class chemicalc.s2n.Sig2NoiseLRIS(grating: str, grism: str, exptime: float, mag: float, template: str, magtype: str = 'Vega', band: str = 'Cousins_I.dat', dichroic: str = 'D560', slitwidth: str = '0.7', binning: str = '1x1', airmass: float = 1.1, seeing: float = 0.75, redshift: float = 0)

Bases: chemicalc.s2n.Sig2NoiseWMKO

Keck/LRIS S/N Query (http://etc.ucolick.org/web_s2n/lris)

Parameters
  • grating (str) – LRIS red arm grating. Must be one of “600/7500”, “600/10000”, “1200/9000”, “400/8500”, or “831/8200”.

  • grism (str) – LRIS blue arm grism. Must be one of “B300” or “B600”.

  • exptime (float) – Exposure time in seconds

  • mag (float) – Magnitude of source

  • template (str) – Spectral template. For valid options see s2n.wmko_options[‘template’].

  • magtype (str) – Magnitude System. Either “Vega” or “AB”

  • band (str) – Magnitude band. For valid options see s2n.wmko_options[‘filter’].

  • dichroic (str) – LRIS dichroic separating the red and blue arms. “D560” is the only option currently.

  • slitwidth (str) – Width of slit in arcseconds. Must be one of “0.7”, “1.0”, or “1.5”

  • binning (str) – spatial x spectral binning. Must be one of “1x1”, “2x1”, “2x2”, or “3x1”

  • airmass (float) – Airmass of observation

  • seeing (float) – Seeing (FWHM) of observation in arcseconds

  • redshift (float) – Redshift of the target

query_s2n()

Query the LRIS ETC (http://etc.ucolick.org/web_s2n/lris)

Returns

class chemicalc.s2n.Sig2NoiseESI(exptime: float, mag: float, template: str, magtype: str = 'Vega', band: str = 'Cousins_I.dat', slitwidth: str = '0.75', binning: str = '1x1', airmass: float = 1.1, seeing: float = 0.75, redshift: float = 0)

Bases: chemicalc.s2n.Sig2NoiseWMKO

Keck/ESI S/N Query (http://etc.ucolick.org/web_s2n/esi)

Parameters
  • exptime (float) – Exposure time in seconds

  • mag (float) – Magnitude of source

  • template (str) – Spectral template. For valid options see s2n.wmko_options[‘template’].

  • magtype (str) – Magnitude System. Either “Vega” or “AB”

  • band (str) – Magnitude band. For valid options see s2n.wmko_options[‘filter’].

  • slitwidth (str) – Width of slit in arcseconds. Must be one of “0.75”, “0.3”, “0.5”, or “1.0”

  • binning (str) – spatial x spectral binning. Must be one of “1x1”, “2x1”, “2x2”, or “3x1”

  • airmass (float) – Airmass of observation

  • seeing (float) – Seeing (FWHM) of observation in arcseconds

  • redshift (float) – Redshift of the target

query_s2n()

Query the ESI ETC (http://etc.ucolick.org/web_s2n/esi)

Returns

class chemicalc.s2n.Sig2NoiseHIRES(slitwidth: str, exptime: float, mag: float, template: str, magtype: str = 'Vega', band: str = 'Cousins_I.dat', binning: str = '1x1', airmass: float = 1.1, seeing: float = 0.75, redshift: float = 0)

Bases: chemicalc.s2n.Sig2NoiseWMKO

Keck/HIRES S/N Query (http://etc.ucolick.org/web_s2n/hires)

Parameters
  • slitwidth (str) – HIRES Decker. Must be “C5” (1.15”), “E4” (0.40”), “B2” (0.57”), “B5” (0.86”), “E5” (0.80”), or “D3” (1.72”)

  • exptime (float) – Exposure time in seconds

  • mag (float) – Magnitude of source

  • template (str) – Spectral template. For valid options see s2n.wmko_options[‘template’].

  • magtype (str) – Magnitude System. Either “Vega” or “AB”

  • band (str) – Magnitude band. For valid options see s2n.wmko_options[‘filter’].

  • binning (str) – spatial x spectral binning. Must be one of “1x1”, “2x1”, “2x2”, or “3x1”.

  • airmass (float) – Airmass of observation

  • seeing (float) – Seeing (FWHM) of observation in arcseconds

  • redshift (float) – Redshift of the target

query_s2n()

Query the HIRES ETC (http://etc.ucolick.org/web_s2n/hires)

Returns

class chemicalc.s2n.Sig2NoiseHectoBinoSpec(inst_mode: str, exptime: float, mag: float, band: str = 'g_filt', template: str = 'K0V', seeing: float = 0.75, airmass: float = 1.1, moonage: float = 0.0, aptype: str = 'Round', apwidth: float = 1.0)

Bases: chemicalc.s2n.Sig2NoiseQuery

MMT/Hectospec and MMT/Binospec S/N Query (http://hopper.si.edu/etc-cgi/TEST/sao-etc)

Parameters
  • inst_mode (str) – Instrument and mode. One of: “BINOSPEC_1000”, “BINOSPEC_270”, “BINOSPEC_600”, “HECTOSPEC_270”, or “HECTOSPEC_600”

  • exptime (float) – Exposure time in seconds

  • mag (float) – AB Magnitude of source

  • band (str) – Magnitude band. One of “r_filt”, “g_filt”, or “i_filt”

  • template (str) – Spectral template. For valid options see s2n.mmt_options[‘template’].

  • seeing (float) – Seeing (FWHM) of observation in arcseconds

  • airmass (float) – Airmass of observation

  • moonage (float) – Moon Phase (days since new moon)

  • aptype (str) – Aperture shape. Must be one of “Round”, “Square”, or “Rectangular”.

  • apwidth (float) – Width of aperture in arcseconds

query_s2n()

Query the Hectospec/Binospec ETC (http://hopper.si.edu/etc-cgi/TEST/sao-etc)

Returns

class chemicalc.s2n.Sig2NoiseVLT(instrument: str, exptime: float, mag: float, band: str = 'V', magtype: str = 'Vega', template_type: str = 'template_spectrum', template: str = 'Pickles_K2V', redshift: float = 0, airmass: float = 1.1, moon_phase: float = 0.0, seeing: str = '0.8', **kwargs)

Bases: chemicalc.s2n.Sig2NoiseQuery

Superclass for VLT ETC Queries

Parameters
  • instrument (str) – VLT instrument. Must be “UVES”, “FLAMES-UVES”, “FLAMES-GIRAFFE”, “X-SHOOTER”, or “MUSE”

  • exptime (float) – Exposure time in seconds

  • mag (float) – Magnitude of source

  • band (str) – Magnitude band. For valid options see s2n.vlt_options[‘src_target_mag_band (<instrument>)’].

  • magtype (str) – Magnitude System. Either “Vega” or “AB”

  • template_type (str) – Type of SED template. For now, only “template_spectrum” is supported.

  • template (str) – Spectral template. For valid options see s2n.vlt_options[‘src_target_spec_type’].

  • redshift (float) – Redshift of the target

  • airmass (float) – Airmass of observation

  • moon_phase (float) – Moon Phase between 0.0 (new) and 1.0 (full)

  • seeing (str) – Seeing (FWHM) of observation in arcseconds. For valid options see s2n.vlt_options[‘sky_seeing’].

  • **kwargs – Other entries in the ETC web form to set. To see what options are available, an inspection of the ETC website is necessary.

query_s2n() → None

No generic S/N query, see specific instrument subclasses

Returns

class chemicalc.s2n.Sig2NoiseUVES(detector: str, exptime: float, mag: float, band: str = 'V', magtype: str = 'Vega', template_type: str = 'template_spectrum', template: str = 'Pickles_K2V', redshift: float = 0, airmass: float = 1.1, moon_phase: float = 0.0, seeing: str = '0.8', slitwidth: str = '1.0', binning: str = '1x1', mid_order_only: bool = False, **kwargs)

Bases: chemicalc.s2n.Sig2NoiseVLT

VLT/UVES S/N Query (http://www.eso.org/observing/etc/bin/gen/form?INS.NAME=UVES++INS.MODE=spectro)

Parameters
  • detector (str) – UVES detector setup. For valid options see s2n.vlt_options[‘uves_det_cd_name’].

  • exptime (float) – Exposure time in seconds

  • mag (float) – Magnitude of source

  • band (str) – Magnitude band. For valid options see s2n.vlt_options[‘src_target_mag_band (UVES)’].

  • magtype (str) – Magnitude System. Either “Vega” or “AB”

  • template_type (str) – Type of SED template. For now, only “template_spectrum” is supported.

  • template (str) – Spectral template. For valid options see s2n.vlt_options[‘src_target_spec_type’].

  • redshift (float) – Redshift of the target

  • airmass (float) – Airmass of observation

  • moon_phase (float) – Moon Phase between 0.0 (new) and 1.0 (full)

  • seeing (str) – Seeing (FWHM) of observation in arcseconds. For valid options see s2n.vlt_options[‘sky_seeing’].

  • slitwidth (str) – Width of slit in arcseconds. For valid options see s2n.vlt_options[‘uves_slit_width’].

  • binning (str) – spatial x spectral binning. For valid options see s2n.vlt_options[‘uves_ccd_binning’].

  • mid_order_only (bool) – If True, returns only peak S/N in each order. Otherwise the S/N at both ends of each order are also included.

  • **kwargs – Other entries in the ETC web form to set. To see what options are available, an inspection of the ETC website is necessary.

query_s2n()

Query the UVES ETC (http://www.eso.org/observing/etc/bin/gen/form?INS.NAME=UVES++INS.MODE=spectro)

Returns

parse_etc()
parse_etc_mid()
class chemicalc.s2n.Sig2NoiseFLAMESUVES(detector: str, exptime: float, mag: float, band: str = 'V', magtype: str = 'Vega', template_type: str = 'template_spectrum', template: str = 'Pickles_K2V', redshift: float = 0, airmass: float = 1.1, moon_phase: float = 0.0, seeing: str = '0.8', mid_order_only: bool = False, **kwargs)

Bases: chemicalc.s2n.Sig2NoiseVLT

VLT/FLAMES-UVES S/N Query (https://www.eso.org/observing/etc/bin/gen/form?INS.NAME=UVES+INS.MODE=FLAMES)

Parameters
  • detector (str) – UVES detector setup. For valid options see s2n.vlt_options[‘uves_det_cd_name’].

  • exptime (float) – Exposure time in seconds

  • mag (float) – Magnitude of source

  • band (str) – Magnitude band. For valid options see s2n.vlt_options[‘src_target_mag_band (UVES)’].

  • magtype (str) – Magnitude System. Either “Vega” or “AB”

  • template_type (str) – Type of SED template. For now, only “template_spectrum” is supported.

  • template (str) – Spectral template. For valid options see s2n.vlt_options[‘src_target_spec_type’].

  • redshift (float) – Redshift of the target

  • airmass (float) – Airmass of observation

  • moon_phase (float) – Moon Phase between 0.0 (new) and 1.0 (full)

  • seeing (str) – Seeing (FWHM) of observation in arcseconds. For valid options see s2n.vlt_options[‘sky_seeing’].

  • mid_order_only (bool) – If True, returns only peak S/N in each order. Otherwise the S/N at both ends of each order are also included.

  • **kwargs – Other entries in the ETC web form to set. To see what options are available, an inspection of the ETC website is necessary.

query_s2n()

Query the FLAMES-UVES ETC (https://www.eso.org/observing/etc/bin/gen/form?INS.NAME=UVES+INS.MODE=FLAMES)

Returns

parse_etc()
parse_etc_mid()
class chemicalc.s2n.Sig2NoiseFLAMESGIRAFFE(slicer: str, exptime: float, mag: float, band: str = 'V', magtype: str = 'Vega', template_type: str = 'template_spectrum', template: str = 'Pickles_K2V', redshift: float = 0, airmass: float = 1.1, moon_phase: float = 0.0, seeing: str = '0.8', sky_sampling_mode='MEDUSA', ccd_mode='standard', fiber_obj_decenter=0.0, **kwargs)

Bases: chemicalc.s2n.Sig2NoiseVLT

VLT/FLAMES-GIRAFFE S/N Query (https://www.eso.org/observing/etc/bin/gen/form?INS.NAME=GIRAFFE+INS.MODE=spectro)

Parameters
  • slicer (str) – GIRAFFE slicer. For valid options see s2n.vlt_options[‘giraffe_slicer’].

  • exptime (float) – Exposure time in seconds

  • mag (float) – Magnitude of source

  • band (str) – Magnitude band. For valid options see s2n.vlt_options[‘src_target_mag_band (UVES)’].

  • magtype (str) – Magnitude System. Either “Vega” or “AB”

  • template_type (str) – Type of SED template. For now, only “template_spectrum” is supported.

  • template (str) – Spectral template. For valid options see s2n.vlt_options[‘src_target_spec_type’].

  • redshift (float) – Redshift of the target

  • airmass (float) – Airmass of observation

  • moon_phase (float) – Moon Phase between 0.0 (new) and 1.0 (full)

  • seeing (str) – Seeing (FWHM) of observation in arcseconds. For valid options see s2n.vlt_options[‘sky_seeing’].

  • sky_sampling_mode (str) – Fiber Mode. Must be one of “MEDUSA”, “IFU052”, “ARGUS052”, or “ARGUS030”.

  • ccd_mode (str) – CCD readout mode. Must be one of “standard”, “fast”, or “slow”

  • fiber_obj_decenter (float) – Displacement of source from fiber center (from 0.0 to 0.6). Only applicable if sky_sampling_mode=”MEDUSA”.

  • **kwargs – Other entries in the ETC web form to set. To see what options are available, an inspection of the ETC website is necessary.

query_s2n()

Query the FLAMES-GIRAFFE ETC (https://www.eso.org/observing/etc/bin/gen/form?INS.NAME=GIRAFFE+INS.MODE=spectro)

Returns

parse_etc()
class chemicalc.s2n.Sig2NoiseXSHOOTER(exptime: float, mag: float, band: str = 'V', magtype: str = 'Vega', template_type: str = 'template_spectrum', template: str = 'Pickles_K2V', redshift: float = 0, airmass: float = 1.1, moon_phase: float = 0.0, seeing: str = '0.8', uvb_slitwidth: str = '0.8', vis_slitwidth: str = '0.7', nir_slitwidth: str = '0.9', uvb_ccd_binning: str = 'high1x1slow', vis_ccd_binning: str = 'high1x1slow', **kwargs)

Bases: chemicalc.s2n.Sig2NoiseVLT

VLT/X-SHOOTER S/N Query (https://www.eso.org/observing/etc/bin/gen/form?INS.NAME=X-SHOOTER+INS.MODE=spectro)

Parameters
  • exptime (float) – Exposure time in seconds

  • mag (float) – Magnitude of source

  • band (str) – Magnitude band. For valid options see s2n.vlt_options[‘src_target_mag_band (UVES)’].

  • magtype (str) – Magnitude System. Either “Vega” or “AB”

  • template_type (str) – Type of SED template. For now, only “template_spectrum” is supported.

  • template (str) – Spectral template. For valid options see s2n.vlt_options[‘src_target_spec_type’].

  • redshift (float) – Redshift of the target

  • airmass (float) – Airmass of observation

  • moon_phase (float) – Moon Phase between 0.0 (new) and 1.0 (full)

  • seeing (str) – Seeing (FWHM) of observation in arcseconds. For valid options see s2n.vlt_options[‘sky_seeing’].

  • uvb_slitwidth (str) – Width of UVB spectrograph slit in arcseconds

  • vis_slitwidth (str) – Width of VIS spectrograph slit in arcseconds

  • nir_slitwidth (str) – Width of NIR spectrograph slit in arcseconds

  • uvb_ccd_binning (str) – UVB CCD gain/binning/readout mode. For valid options see s2n.vlt_options[‘xshooter_uvb_ccd_binning’].

  • vis_ccd_binning (str) – VIS CCD gain/binning/readout mode. For valid options see s2n.vlt_options[‘xshooter_vis_ccd_binning’].

  • **kwargs – Other entries in the ETC web form to set. To see what options are available, an inspection of the ETC website is necessary.

query_s2n()

Query the X-SHOOTER ETC (https://www.eso.org/observing/etc/bin/gen/form?INS.NAME=X-SHOOTER+INS.MODE=spectro)

Returns

parse_etc()
class chemicalc.s2n.Sig2NoiseMUSE(exptime: float, mag: float, band: str = 'V', magtype: str = 'Vega', template_type: str = 'template_spectrum', template: str = 'Pickles_K2V', redshift: float = 0, airmass: float = 1.1, moon_phase: float = 0.0, seeing: str = '0.8', mode: str = 'WFM_NONAO_N', spatial_binning: str = '3', spectra_binning: str = '1', target_offset: float = 0, **kwargs)

Bases: chemicalc.s2n.Sig2NoiseVLT

VLT/MUSE S/N Query (https://www.eso.org/observing/etc/bin/gen/form?INS.NAME=MUSE+INS.MODE=swspectr)

Parameters
  • exptime (float) – Exposure time in seconds

  • mag (float) – Magnitude of source

  • band (str) – Magnitude band. For valid options see s2n.vlt_options[‘src_target_mag_band (UVES)’].

  • magtype (str) – Magnitude System. Either “Vega” or “AB”

  • template_type (str) – Type of SED template. For now, only “template_spectrum” is supported.

  • template (str) – Spectral template. For valid options see s2n.vlt_options[‘src_target_spec_type’].

  • redshift (float) – Redshift of the target

  • airmass (float) – Airmass of observation

  • moon_phase (float) – Moon Phase between 0.0 (new) and 1.0 (full)

  • seeing (str) – Seeing (FWHM) of observation in arcseconds. For valid options see s2n.vlt_options[‘sky_seeing’].

  • mode (str) – MUSE instument mode. For valid options see s2n.vlt_options[‘muse_mode’].

  • spatial_binning (str) – Spatial binning. For valid options see s2n.vlt_options[‘muse_spatial_binning’].

  • spectra_binning (str) – Spectral binning. For valid options see s2n.vlt_options[‘muse_spectra_binning’].

  • target_offset (float) – Displacement of source from fiber center.

  • **kwargs – Other entries in the ETC web form to set. To see what options are available, an inspection of the ETC website is necessary.

query_s2n()

Query the MUSE ETC (https://www.eso.org/observing/etc/bin/gen/form?INS.NAME=MUSE+INS.MODE=swspectr)

Returns

parse_etc()
class chemicalc.s2n.Sig2NoiseMSE(exptime: float, mag: float, template: str, spec_mode: str = 'LR', band: str = 'g', airmass: str = '1.2', seeing: float = 0.5, skymag: float = 20.7, src_type: str = 'point', redshift: float = 0, smoothed: bool = False)

Bases: chemicalc.s2n.Sig2NoiseQuery

MSE S/N Query (http://etc-dev.cfht.hawaii.edu/mse/)

Parameters
  • exptime (float) – Exposure time in seconds

  • mag (float) – Magnitude of source

  • template (str) – Spectral template. For valid options see s2n.mse_options[‘template’].

  • spec_mode (str) – MSE mode. Must be “LR” (low resolution), “MR” (medium resolution), or “HR” (high resolution)

  • band (str) – Magnitude band. For valid options see s2n.mse_options[‘filter’].

  • airmass (str) – Airmass of observation. Must be one of mse_options[‘airmass’].

  • seeing (float) – Seeing (FWHM) of observation in arcseconds

  • skymag (float) – Background sky magnitude of observation

  • src_type (str) – Spatial profile of source. Must be one of mse_options[‘src_type’].

  • redshift (float) – Redshift of the target.

  • smoothed (bool) – If True, uses smoothed S/N,

query_s2n()
class chemicalc.s2n.Sig2NoiseLCO(instrument: str, telescope: str, exptime: float, mag: float, template: str = 'flat', band: str = 'g', airmass: float = 1.1, seeing: float = 0.5, nmoon: str = '0', nexp: int = 1, slitwidth: float = 1.0, binspat: str = '3', binspec: str = '1', extract_ap: float = 1.5)

Bases: chemicalc.s2n.Sig2NoiseQuery

Superclass for LCO ETC Queries (http://www.lco.cl/scripts/lcoetc/lcoetc_sspec.html)

Parameters
  • instrument – LCO instrument. Valid options are “MIKE”, “LDSS3”, “IMACS”, and “MAGE”.

  • telescope – LCO telescope. “MAGELLAN1” for IMACS and MAGE. “MAGELLAN2” for LDSS3 and MIKE.

  • exptime – Exposure time in seconds

  • mag – Magnitude of source

  • template – Spectral template. For valid options see s2n.lco_options[‘template’].

  • band – Magnitude band. For valid options see s2n.lco_options[‘filter’].

  • airmass – Airmass of observation

  • seeing – Seeing (FWHM) of observation in arcseconds

  • nmoon – Days from since new moon. For valid options see s2n.lco_options[‘nmoon’].

  • nexp – Number of exposures

  • slitwidth – Width of slit in arcseconds

  • binspat – Binning in the spatial direction. For valid options see s2n.lco_options[‘binspat’].

  • binspec – Binning in the spectral direction. For valid options see s2n.lco_options[‘binspec’].

  • extract_ap – Size of extraction aperture in arcseconds.

query_s2n()
class chemicalc.s2n.Sig2NoiseIMACS(mode: str, exptime: float, mag: float, template: str = 'flat', band: str = 'g', airmass: float = 1.1, seeing: float = 0.5, nmoon: str = '0', nexp: int = 1, slitwidth: float = 1.0, binspat: str = '3', binspec: str = '1', extract_ap: float = 1.5)

Bases: chemicalc.s2n.Sig2NoiseLCO

Magellan/IMACS S/N Query (http://www.lco.cl/scripts/lcoetc/lcoetc_sspec.html)

Parameters
  • mode – IMACS mode. For valid options see s2n.lco_options[‘IMACS_mode’].

  • exptime – Exposure time in seconds

  • mag – Magnitude of source

  • template – Spectral template. For valid options see s2n.lco_options[‘template’].

  • band – Magnitude band. For valid options see s2n.lco_options[‘filter’].

  • airmass – Airmass of observation

  • seeing – Seeing (FWHM) of observation in arcseconds

  • nmoon – Days from since new moon. For valid options see s2n.lco_options[‘nmoon’].

  • nexp – Number of exposures

  • slitwidth – Width of slit in arcseconds

  • binspat – Binning in the spatial direction. For valid options see s2n.lco_options[‘binspat’].

  • binspec – Binning in the spectral direction. For valid options see s2n.lco_options[‘binspec’].

  • extract_ap – Size of extraction aperture in arcseconds.

class chemicalc.s2n.Sig2NoiseMAGE(mode: str, exptime: float, mag: float, template: str = 'flat', band: str = 'g', airmass: float = 1.1, seeing: float = 0.5, nmoon: str = '0', nexp: int = 1, slitwidth: float = 1.0, binspat: str = '3', binspec: str = '1', extract_ap: float = 1.5)

Bases: chemicalc.s2n.Sig2NoiseLCO

Magellan/MAGE S/N Query (http://www.lco.cl/scripts/lcoetc/lcoetc_sspec.html)

Parameters
  • mode – MAGE mode. “ECHELLETTE” is currently the only option.

  • exptime – Exposure time in seconds

  • mag – Magnitude of source

  • template – Spectral template. For valid options see s2n.lco_options[‘template’].

  • band – Magnitude band. For valid options see s2n.lco_options[‘filter’].

  • airmass – Airmass of observation

  • seeing – Seeing (FWHM) of observation in arcseconds

  • nmoon – Days from since new moon. For valid options see s2n.lco_options[‘nmoon’].

  • nexp – Number of exposures

  • slitwidth – Width of slit in arcseconds

  • binspat – Binning in the spatial direction. For valid options see s2n.lco_options[‘binspat’].

  • binspec – Binning in the spectral direction. For valid options see s2n.lco_options[‘binspec’].

  • extract_ap – Size of extraction aperture in arcseconds.

class chemicalc.s2n.Sig2NoiseMIKE(mode: str, exptime: float, mag: float, template: str = 'flat', band: str = 'g', airmass: float = 1.1, seeing: float = 0.5, nmoon: str = '0', nexp: int = 1, slitwidth: float = 1.0, binspat: str = '3', binspec: str = '1', extract_ap: float = 1.5)

Bases: chemicalc.s2n.Sig2NoiseLCO

Magellan/MIKE S/N Query (http://www.lco.cl/scripts/lcoetc/lcoetc_sspec.html)

Parameters
  • mode – MIKE mode. Valid options are “BLUE” and “RED”.

  • exptime – Exposure time in seconds

  • mag – Magnitude of source

  • template – Spectral template. For valid options see s2n.lco_options[‘template’].

  • band – Magnitude band. For valid options see s2n.lco_options[‘filter’].

  • airmass – Airmass of observation

  • seeing – Seeing (FWHM) of observation in arcseconds

  • nmoon – Days from since new moon. For valid options see s2n.lco_options[‘nmoon’].

  • nexp – Number of exposures

  • slitwidth – Width of slit in arcseconds

  • binspat – Binning in the spatial direction. For valid options see s2n.lco_options[‘binspat’].

  • binspec – Binning in the spectral direction. For valid options see s2n.lco_options[‘binspec’].

  • extract_ap – Size of extraction aperture in arcseconds.

class chemicalc.s2n.Sig2NoiseLDSS3(mode: str, exptime: float, mag: float, template: str = 'flat', band: str = 'g', airmass: float = 1.1, seeing: float = 0.5, nmoon: str = '0', nexp: int = 1, slitwidth: float = 1.0, binspat: str = '3', binspec: str = '1', extract_ap: float = 1.5)

Bases: chemicalc.s2n.Sig2NoiseLCO

Magellan/LDSS-3 S/N Query (http://www.lco.cl/scripts/lcoetc/lcoetc_sspec.html)

Parameters
  • mode – LDSS-3 mode. Valid options are “VPHALL”, “VPHBLUE”, and “VPHRED”.

  • exptime – Exposure time in seconds

  • mag – Magnitude of source

  • template – Spectral template. For valid options see s2n.lco_options[‘template’].

  • band – Magnitude band. For valid options see s2n.lco_options[‘filter’].

  • airmass – Airmass of observation

  • seeing – Seeing (FWHM) of observation in arcseconds

  • nmoon – Days from since new moon. For valid options see s2n.lco_options[‘nmoon’].

  • nexp – Number of exposures

  • slitwidth – Width of slit in arcseconds

  • binspat – Binning in the spatial direction. For valid options see s2n.lco_options[‘binspat’].

  • binspec – Binning in the spectral direction. For valid options see s2n.lco_options[‘binspec’].

  • extract_ap – Size of extraction aperture in arcseconds.

chemicalc.s2n.calculate_mods_snr(F: numpy.ndarray, wave: numpy.ndarray, t_exp: float, airmass: float = 1.1, slitloss: float = 0.76, mode: str = 'dichroic', side: Optional[str] = None) → numpy.ndarray

Calculate S/N for LBT/MODS. Based on the calculations and data presented here: https://sites.google.com/a/lbto.org/mods/preparing-to-observe/sensitivity

Parameters
  • F (np.ndarray) – Flux (ergs s^-1 Angstrom^-1 cm^-2)

  • wave (np.ndarray) – Wavelength array (Angstrom)

  • t_exp (float) – Exposure time in seconds

  • airmass (float) – Airmass of observation

  • slitloss (float) – Slit loss factor (i.e., the fraction of the flux that makes it through the slit).

  • mode (str) – “dichroic” for both red and blue detectors or “direct” for just one or the other.

  • side (Optional[str]) – Detector to use if mode=”direct”. Must be either “red” or “blue”.

Return np.ndarray

S/N as a function of wavelength for LBT/MODS

chemicalc.s2n.calculate_fobos_snr(spec_file: Optional[str] = None, spec_wave: Union[str, float] = 'WAVE', spec_wave_units: str = 'angstrom', spec_flux: Union[str, float] = 'FLUX', spec_flux_units: Optional[str] = None, spot_fwhm: float = 5.8, spec_res_indx: Optional[Union[str, float]] = None, spec_res_value: Optional[float] = None, spec_table: Optional[Union[str, float]] = None, mag: float = 24.0, mag_band: str = 'g', mag_system: str = 'AB', sky_mag: Optional[float] = None, sky_mag_band: str = 'g', sky_mag_system: str = 'AB', redshift: float = 0.0, emline: Optional[str] = None, sersic: Optional[Tuple[float, float, float, float]] = None, uniform: bool = False, exptime: float = 3600.0, fwhm: float = 0.65, airmass: float = 1.0, snr_units: str = 'pixel', sky_err: float = 0.1, print_summary: bool = True) → numpy.ndarray

This is slightly modified code from https://github.com/Keck-FOBOS/enyo/blob/master/python/enyo/scripts/fobos_etc.py

Parameters
  • spec_file (Optional[str]) – A fits or ascii file with the object spectrum to use. If None, a flat spectrum is used.

  • Union[str,float]spec_wave – Extension or column number with the wavelengths.

  • spec_wave_units (str) – Wavelength units

  • spec_flux (Union[str,float]) – Extension or column number with the flux.

  • spec_flux_units (Optional[str]) – Input units of the flux density. Must be interpretable by astropy.units.Unit. Assumes 1e-17 erg / (cm2 s angstrom) if units are not provided.

  • spot_fwhm (float) – FHWM of the monochromatic spot size on the detector in pixels.

  • spec_res_indx (Optional[Union[str,float]]) – Extension or column number with the flux.

  • spec_res_value (Optional[float]) – Single value for the spectral resolution (R = lambda/dlambda) for the full spectrum.

  • spec_table (Optional[Union[str,float]]) – Extension in the fits file with the binary table data.

  • mag (float) – Total apparent magnitude of the source

  • mag_band (str) – Broad-band used for the provided magnitude. Must be u, g, r, i, or z.

  • mag_system (str) – Magnitude system. Must be either AB or Vega.

  • sky_mag (Optional[float]) – Surface brightness of the sky in mag/arcsec^2 in the defined broadband. If not provided, default dark-sky spectrum is used.

  • sky_mag_band (str) – Broad-band used for the provided sky surface brightness. Must be u, g, r, i, or z.

  • sky_mag_system (str) – Magnitude system. Must be either AB or Vega.

  • redshift (float) – Redshift of the object, z

  • emline (Optional[str]) – File with emission lines to add to the spectrum.

  • sersic (Optional[Tuple[float,float,float,float]]) – Use a Sersic profile to describe the object surface-brightness distribution; order must be effective radius, Sersic index, ellipticity (1-b/a), position angle (deg).

  • uniform (bool) – Instead of a point source or Sersic profile, assume the surface brightness distribution is uniform over the fiber face. If set, the provided magnitude is assumed to be a surface brightness. See the MAG option.

  • exptime (float) – Exposure time (s)

  • fwhm (float) – On-sky PSF FWHM (arcsec)

  • airmass (float) – Airmass

  • snr_units (str) – The units for the S/N. Options are pixel, angstrom, resolution.

  • sky_err (float) – The fraction of the Poisson error in the sky incurred when subtracting the sky from the observation. Set to 0 for a sky subtraction that adds no error to the sky-subtracted spectrum; set to 1 for a sky-subtraction error that is the same as the Poisson error in the sky spectrum acquired during the observation.

  • print_summary (bool) – If True, prints a summary of the calculations.

Return np.ndarray

S/N as a function of wavelength for Keck/FOBOS

chemicalc.s2n.calculate_wfos_snr(spec_file: Optional[str] = None, spec_wave: Union[str, float] = 'WAVE', spec_wave_units: str = 'angstrom', spec_flux: Union[str, float] = 'FLUX', spec_flux_units: Optional[str] = None, spec_res_indx: Optional[Union[str, float]] = None, spec_res_value: Optional[float] = None, spec_table: Optional[Union[str, float]] = None, mag: float = 24.0, mag_band: str = 'g', mag_system: str = 'AB', redshift: float = 0.0, emline: Optional[str] = None, sersic: Optional[Tuple[float, float, float, float]] = None, uniform: bool = False, exptime: float = 3600.0, fwhm: float = 0.65, airmass: float = 1.0, snr_units: str = 'pixel', sky_err: float = 0.1, refl: str = 'req', blue_grat: str = 'B1210', blue_wave: Optional[float] = None, blue_angle: Optional[float] = None, blue_binning: Optional[Tuple[int, int]] = 1, 1, red_grat: str = 'R680', red_wave: Optional[float] = None, red_angle: Optional[float] = None, red_binning: Optional[Tuple[int, int]] = 1, 1, slit: Optional[Tuple[float, float, float, float, float]] = 0.0, 0.0, 0.75, 5.0, 0.0, extract_size: Optional[float] = None, return_R: bool = False, print_summary: bool = True) → Union[numpy.ndarray, Tuple[numpy.ndarray, numpy.ndarray]]

This is slightly modified code from https://github.com/Keck-FOBOS/enyo/blob/master/enyo/scripts/wfos_etc.py

Parameters
  • spec_file (Optional[str]) – A fits or ascii file with the object spectrum to use. If None, a flat spectrum is used.

  • Union[str,float]spec_wave – Extension or column number with the wavelengths.

  • spec_wave_units (str) – Wavelength units

  • spec_flux (Union[str,float]) – Extension or column number with the flux.

  • spec_flux_units (Optional[str]) – Input units of the flux density. Must be interpretable by astropy.units.Unit. Assumes 1e-17 erg / (cm2 s angstrom) if units are not provided.

  • spec_res_indx (Optional[Union[str,float]]) – Extension or column number with the flux.

  • spec_res_value (Optional[float]) – Single value for the spectral resolution (R = lambda/dlambda) for the full spectrum.

  • spec_table (Optional[Union[str,float]]) – Extension in the fits file with the binary table data.

  • mag (float) – Total apparent magnitude of the source

  • mag_band (str) – Broad-band used for the provided magnitude. Must be u, g, r, i, or z.

  • mag_system (str) – Magnitude system. Must be either AB or Vega.

  • redshift (float) – Redshift of the object, z

  • emline (Optional[str]) – File with emission lines to add to the spectrum.

  • sersic (Optional[Tuple[float,float,float,float]]) – Use a Sersic profile to describe the object surface-brightness distribution; order must be effective radius, Sersic index, ellipticity (1-b/a), position angle (deg).

  • uniform (bool) – Instead of a point source or Sersic profile, assume the surface brightness distribution is uniform over the fiber face. If set, the provided magnitude is assumed to be a surface brightness. See the MAG option.

  • exptime (float) – Exposure time (s)

  • fwhm (float) – On-sky PSF FWHM (arcsec)

  • airmass (float) – Airmass

  • snr_units (str) – The units for the S/N. Options are pixel, angstrom, resolution.

  • sky_err (float) – The fraction of the Poisson error in the sky incurred when subtracting the sky from the observation. Set to 0 for a sky subtraction that adds no error to the sky-subtracted spectrum; set to 1 for a sky-subtraction error that is the same as the Poisson error in the sky spectrum acquired during the observation.

  • refl (str) – Select the reflectivity curve for TMT. Must be either ‘req’ or ‘goal’ for the required or goal reflectivity performance.

  • blue_grat (str) – Grating to use in the blue arm. For valid options see enyo.etc.spectrographs.WFOSGrating.available_gratings.keys()

  • blue_wave (Optional[float]) – Central wavelength for the blue arm. If None, will use the peak-efficiency wavelength.

  • blue_angle (Optional[float]) – Grating angle for blue grating. If None, will use then angle the provides the best efficiency for the on-axis spectrum.

  • blue_binning (Optional[Tuple[int,int]]) – On-chip binning for the blue grating. Order is spectral then spatial. I.e., to bin 2 pixels spectrally and no binning spatial, use (2, 1)

  • red_grat (str) – Grating to use in the red arm. For valid options see enyo.etc.spectrographs.WFOSGrating.available_gratings.keys()

  • red_wave (Optional[float]) – Central wavelength for the red arm. If None, will use the peak-efficiency wavelength.

  • red_angle (Optional[float]) – Grating angle for red grating. If None, will use then angle the provides the best efficiency for the on-axis spectrum.

  • red_binning (Optional[Tuple[int,int]]) – On-chip binning for the red grating. Order is spectral then spatial. I.e., to bin 2 pixels spectrally and no binning spatial, use (2, 1)

  • slit (Optional[Tuple[float,float,float,float,float]]) – Slit properties: x field center, y field center, width, length, rotation. The rotation is in degrees, everything else is in on-sky arcsec. The slit width is in the unrotated frame, meaning the effective slit width for a rotated slit is slit_width/cos(rotation). For the field center, x is along the dispersion direction with a valid range of +/- 90 arcsec, and y is in the cross-dispersion direction with a valid range of +/- 249 arcsec. Coordinate (0,0) is on axis.

  • extract_size (Optional[float]) – Extraction aperture in arcsec along the slit centered on the source. At the detector, the extraction aperture is narrower by cos(slit rotation). If not provided, set to the FWHM of the seeing disk.

  • return_R (bool) – If True, also returns the resolution as a function of wavelength.

  • print_summary (bool) – If True, prints a summary of the calculations.

Return Union[np.ndarray,Tuple[np.ndarray,np.ndarray]]

S/N as a function of wavelength for Keck/WFOS. If return_R, a tuple of S/N and resolving power as a function of wavelength.

chemicalc.s2n.calculate_muse_snr(wave: numpy.ndarray, flux: numpy.ndarray, exptime: float, nexp: int, blueMUSE: bool = False, airmass: float = 1.0, seeing: float = 0.8, moon: str = 'd', pointsource: bool = True, nspatial: float = 3, nspectral: float = 1)

Calculates the S/N for VLT/MUSE and VLT/blueMUSE. This code is adapted from https://git-cral.univ-lyon1.fr/johan.richard/BlueMUSE-ETC.

Parameters
  • wave (np.ndarray) – Wavelength array corresponding to flux array

  • flux (np.ndarray) – Flux of source (ergs s^-1 Angstrom^-1 cm^-2)

  • exptime (float) – Exposure time in seconds

  • nexp (int) – Number of exposures

  • blueMUSE (bool) – If True, performs calculation for blueMUSE. If False, performs calculation for MUSE.

  • airmass (float) – Airmass of observation

  • seeing (float) – Seeing (FWHM) of observation in arcseconds

  • moon (str) – “d” for dark conditions. “g” for grey conditions.

  • pointsource (bool) – True if source is a point source. False if source is extended.

  • nspatial (int) – Binning in the spacial direction

  • nspectral (int) – Binning in the spectral direction

Return np.ndarray

S/N as a function of wavelength for VLT/(blue)MUSE