mangadap.par.obsinput module

Define a parameter instance that holds the input information needed to run the DAP for a specific MaNGA observation.

License:
Copyright (c) 2015, SDSS-IV/MaNGA Pipeline Group
Licensed under BSD 3-clause license - see LICENSE.rst
Source location:
$MANGADAP_DIR/python/mangadap/par/obsinput.py
Class usage examples:

To define a set of observation parameteters:

from mangadap.par.obsinput import ObsInputPar
p = ObsInputPar(plate=7443, ifudesign=12701, mode='CUBE', vel=6139,
                vdisp=100, ell=0.3416, pa=150.24, reff=5.70)

Or declare the parameter object by reading an SDSS-style parameter file:

from mangadap.par.obsinput import ObsInputPar p = ObsInputPar.from_par_file(‘mangadap-7443-12701-LOGCUBE.par’)
Revision history:
15 Mar 2016: Original implementation by K. Westfall (KBW)
11 May 2016: (KBW) Switch to using pydl.pydlutils.yanny instead of internal yanny reader.
24 Aug 2017: (KBW) Provide new ‘valid’ attributes to signify if the input data was changed to the default value.
11 Nov 2017: (KBW) Change velocity minimum to -500 km/s to match mangadap.survey.drpcomplete.DRPComplete
class mangadap.par.obsinput.ObsInputPar(plate, ifudesign, mode=None, vel=None, vdisp=None, ell=None, pa=None, reff=None)[source]

Bases: mangadap.par.parset.ParSet

Parameter object that defines the input observation and guess parameters to be used by the DAP.

Although technically optional in this version, use of the class by the DAP requires that vel must be defined.

See mangadap.par.parset.ParSet for attributes and raised exceptions.

Parameters:
  • plate (int) – Plate number; default is None.
  • ifudesign (int) – IFU designation; default is None.
  • mode (str) – DRP 3D mode; see mangadap.drpfits.DRPFits.mode_options(); default is CUBE.
  • vel (float) – Systemic velocity (km/s); default is None.
  • vdisp (float) – Guess velocity dispersion (km/s); default is 100.
  • ell (float) – Isophotal ellipticity (\(\varepsilon = 1-b/a\)); default is 0 (circular).
  • pa (float) – Position angle (degrees) of the isophotal major axis; default is 0.
  • reff (float) – Effective radius (arcsec); default is 1.0.
valid_vdisp

Input velocity dispersion was >0.

Type:bool
valid_ell

Input ellipticiticy was within [0,1].

Type:bool
valid_pa

Input position angle was within [0,360).

Type:bool
valid_reff

Input effective radius was >0.

Type:bool
_check()[source]

Check that the values in the parameter list adhere to some hard-coded limits.

  • Velocity (\(cz\)) and velocity dispersion have to be greater than -500.
  • Ellipticity has to be \(0 \leq \varepsilon < 1\)
  • Position angle has to be \(0 \leq \phi < 360\)
  • Effective radius has to be greater than zero.
Raises:ValueError – Raised if velocity (\(cz\)) is less than zero.
classmethod from_par_file(f)[source]

Read the observation parameters from the provided yanny file.

Parameters:

f (str) – Name of the file to read

Returns:

Derived instance of mangadap.par.ParSet with the input observational parameters of the DRP data product to analyze with the DAP.

Return type:

ObsInputPar

Raises:
  • FileNotFoundError – Raised if the provided file does not exist.
  • ValueError – Raised if the input yanny file has more than one entry of DAPPAR.
  • KeyError – Raised if selected keys are not in provided file.