mangadap.util.lineprofiles module¶
Implements a set of line profile parameterizations.
Revision history¶
25 May 2017: Original implementation by K. Westfall (KBW)
Copyright © 2019, SDSS-IV/MaNGA Pipeline Group
-
class
mangadap.util.lineprofiles.
FFTGaussianLSF
(p=None, dx=None, pixel=True)[source]¶ Bases:
mangadap.util.lineprofiles.GaussianLSF
Define a Gaussian line profile by first constructing the analytic FFT of the profile and then returning the inverse real FFT. See ppxf_util.emline by M. Cappellari. The sampling must be uniform in \(x\).
- Parameters
p (array-like) – (Optional) Input parameters ordered as the total integral of the profile, the profile center, and the profile standard deviation. Assumed to be (1.0, 0.0, 1.0) by default.
dx (float) – (Optional) Sampling width. Default is 1.
pixel (bool) – (Optional) Flag to produce profile integrated over the sampling width.
-
p
¶ Most recently used parameters
- Type
numpy.ndarray
-
dx
¶ Assumed sampling.
- Type
float
-
pixel
¶ Flag to produce profile integrated over the sampling width.
- Type
bool
- Raises
ValueError – Raised if the provided parameter vector is not 3 elements long.
-
class
mangadap.util.lineprofiles.
GaussianLSF
(p=None)[source]¶ Bases:
object
Define a Gaussian line profile, sampled over the width of the sampling step, parameterized by its integral (\(F\)), center (\(\mu\)), and standard deviation (\(\sigma\)). I.e:
\[\mathcal{N}(x|f,\mu,\sigma) = \frac{f}{\sqrt{2\pi}\sigma} \exp\left(\frac{-\Delta^2}{2\sigma^2}\right)\]where \(\Delta = x-\mu\). The coordinate vector \(x\) does not need to be uniformly sampled.
- Parameters
p (array-like) – (Optional) Input parameters ordered as the total integral of the profile, the profile center, and the profile standard deviation. Assumed to be (1.0, 0.0, 1.0) by default.
-
p
¶ Most recently used parameters
- Type
numpy.ndarray
- Raises
ValueError – Raised if the provided parameter vector is not 3 elements long.
-
class
mangadap.util.lineprofiles.
GaussianLineProfile
(zmom=1.0, mean=0.0, sigma=1.0, **kwargs)[source]¶ Bases:
astropy.modeling.core.FittableModel
Define a Gaussian line profile as parameterized by its zeroth moment, mean, and standard deviation:
\[\mathcal{N}(x|f,\mu,\sigma) = \frac{f}{\sqrt{2\pi}\sigma} \exp\left(\frac{-(x-\mu)^2}{2\sigma^2}\right)\]The base class is astropy.modeling.FittableModel, which facilitates its use in combining multiple components and other models in the astropy.modeling suite.
-
_abc_impl
= <_abc_data object>¶
-
_fix_inputs
(right)¶
-
_is_dynamic
= False¶
-
_parameters_
= {'mean': Parameter('mean', value=0.0), 'sigma': Parameter('sigma', value=1.0), 'zmom': Parameter('zmom', value=1.0)}¶
-
inputs
= ('x',)¶
-
mean
= Parameter('mean', value=0.0)¶
-
outputs
= ('y',)¶
-
param_names
= ('zmom', 'mean', 'sigma')¶
-
sigma
= Parameter('sigma', value=1.0)¶
-
zmom
= Parameter('zmom', value=1.0)¶
-
-
class
mangadap.util.lineprofiles.
IntegratedGaussianLSF
(p=None, dx=None)[source]¶ Bases:
mangadap.util.lineprofiles.GaussianLSF
Define a Gaussian line profile, integrated over the width of the sampling step, parameterized by its integral (\(F\)), center (\(\mu\)), and standard deviation (\(\sigma\)). I.e:
\[\mathcal{N}(x|F,\mu,\sigma) = \frac{F}{2} \left[ {\rm erf}\left(\frac{\Delta+\delta_x/2}{\sqrt{2}\sigma}\right) - {\rm erf}\left(\frac{\Delta-\delta_x/2}{\sqrt{2}\sigma}\right)\right]\]where \({\rm erf}(x)\) is the error function, \(\Delta = x-\mu\), and \(\delta_x\) is the sampling step. The sampling must be uniform in \(x\).
- Parameters
p (array-like) – (Optional) Input parameters ordered as the total integral of the profile, the profile center, and the profile standard deviation. Assumed to be (1.0, 0.0, 1.0) by default.
dx (float) – (Optional) Sampling width. Default is 1.
-
p
¶ Most recently used parameters
- Type
numpy.ndarray
-
dx
¶ Assumed sampling.
- Type
float
- Raises
ValueError – Raised if the provided parameter vector is not 3 elements long.
-
class
mangadap.util.lineprofiles.
NCompLineProfile
(ncomp, par=None, err=None, profile=<class 'mangadap.util.lineprofiles.GaussianLineProfile'> Name: GaussianLineProfile N_inputs: <property object> N_outputs: <property object> Fittable parameters: ('zmom', 'mean', 'sigma'))[source]¶ Bases:
object
Construct a single line profile from many components with the same profile parameterization.