dfisher_2022a

Subpackages

Submodules

dfisher_2022a.app.fit_lm(cubefile, line: str, model: lmfit.model.Model, varfile=None, z=0.0, left=15, right=15, snr_threshold=None, nprocess=2, fit_method='leastsq', mode='parallel', **kwargs)[source]

A wrapper function for cube fitting backed with lmfit.

Parameters
  • cubefile (fits file) – data file

  • line (str) – name of emission line, e.g. “Hapha”

  • model (lmfit.Model or lmfit.CompositeModel) –

  • varfile (fits file, optional) – variance file, by default None.

  • z (float, optional) – redshift, by default 0.

  • left (int, optional) – relative wavelength cut at the left side of the line, by default 15, by default 15

  • right (int, optional) – relative wavelength cut at the right side of the line, by default 15, by default 15

  • snr_threshold (None or float, optional) – snr threshold, by default None

  • nprocess (int, optional) – number of worker processes used in parallel fitting, by default “os.cpu_count()”

  • fit_method (str, optional) – fitting method available in lmfit, by default “leastsq”

  • mode ("parallel" or "serial", optional) – fitting mode, by default “parallel”

  • kwargs (dict, optional) – other keyword arguments that could be passed to dfisher_2022a.CubeFitterLM

Returns

result container

Return type

dfisher_2022a.ResultLM

dfisher_2022a.app.prepare_data(cube: mpdaf.obj.cube.Cube, line: str, z=0.0, left=15, right=15, snr_threshold=None)[source]

Get data ready for fitting.

Parameters
  • cube (mpdaf.obj.Cube) –

  • line (str) – name of emission line, e.g. “Hapha”

  • z (float, optional) – redshift, by default 0.

  • left (int, optional) – relative wavelength cut at the left side of the line, by default 15

  • right (int, optional) – relative wavelength cut at the right side of the line, by default 15

  • snr_threshold (None or float, optional) – snr threshold, by default None

Returns

Return type

dfisher_2022a.ProcessedCube

class dfisher_2022a.cube.CubeRegion(cube: mpdaf.obj.cube.Cube, line: str, left=15, right=15)[source]

Bases: object

get_regional_cube()[source]
property high
property low
class dfisher_2022a.cube.ProcessedCube(cube: mpdaf.obj.cube.Cube, z=0.0, snr_threshold=None)[source]

Bases: object

property data
de_redshift(z=None)[source]
get_snrmap(snr_threshold=None)[source]
select_region(line: str, left=15, right=15)[source]
property weight
property x
class dfisher_2022a.cube.ReadCubeFile(cubefile, varfile=None)[source]

Bases: object

read in fits file and return Cube

property cube
class dfisher_2022a.cube.RestCube(cube: mpdaf.obj.cube.Cube, z=0.0)[source]

Bases: object

class responds for de-reshifting data cube

class dfisher_2022a.cube.SNRMap(cube: mpdaf.obj.cube.Cube, snr_threshold=None)[source]

Bases: object

filter_cube()[source]

filter cube by snr threshold

dfisher_2022a.emission_lines.Halpha = 6562.819

= 6562.819 # Hα

dfisher_2022a.emission_lines.Hb4861 = 4861.333

= 4861.333 # Hβ

dfisher_2022a.emission_lines.Hdelta = 4101.742

= 4101.742 # Hδ

dfisher_2022a.emission_lines.Hgamma = 4340.471

= 4340.471 # Hγ

dfisher_2022a.emission_lines.NeIII = 3868.76

= 3868.760 # [Ne III] 3869

dfisher_2022a.emission_lines.OII3726 = 3726.032

= 3726.032 # [O II] 3727 doublet, line 1

dfisher_2022a.emission_lines.OII3729 = 3728.815

= 3728.815 # [O II] 3727 doublet, line 2

dfisher_2022a.emission_lines.OIII4363 = 4363.21

= 4363.210 # [O III] 4363

dfisher_2022a.emission_lines.OIII4959 = 4958.911

= 4958.911 # [O III] 4959

exception dfisher_2022a.exceptions.EmptyRegionError(message='No region is selected.')[source]

Bases: dfisher_2022a.exceptions.Error

exception dfisher_2022a.exceptions.Error(message)[source]

Bases: Exception

Base class of other error classes.

exception dfisher_2022a.exceptions.InputDimError(dim, message='The input data must be 3-d.')[source]

Bases: dfisher_2022a.exceptions.Error

exception dfisher_2022a.exceptions.InputShapeError(message='')[source]

Bases: dfisher_2022a.exceptions.Error

class dfisher_2022a.line.Line(name: str)[source]

Bases: object

Object to store line information: name, wavelength.

name: str
property wavelength
dfisher_2022a.utils.get_custom_attr(top, cls)[source]

pass attributes from one class to another