def __init__(self,
solution_type=None,
model_name=None,
model_order=0,
model=None,
ref_lamp=None,
eval_comment='',
header=None):
"""Init method for the WavelengthSolution class
Args:
solution_type (str): Type of wavelength solution.
model_name (str): Mathematical model name.
model_order (int): Order of the mathematical model in case it is a
polynomial which in most cases it is.
model (object): Instance of astropy.modeling.Model, represents the
transformation from pixel to angstrom.
ref_lamp (str): File name of reference lamp used to find the
wavelength solution
eval_comment (str): Text describing the qualitative evaluation of
the wavelength solution.
header (object): Instance of astropy.io.fits.header.Header
"""
self.log = logging.getLogger(__name__)
self.dtype_dict = {None: -1,
'linear': 0,
'log_linear': 1,
'non_linear': 2}
# if solution_type == 'non_linear' and model_name is not None:
self.ftype_dict = {'chebyshev': 1,
'legendre': 2,
'cubic_spline': 3,
'linear_spline': 4,
'pixel_coords': 5,
'samples_coords': 6,
None: None}
self.solution_type = solution_type
self.model_name = model_name
self.model_order = model_order
self.wsolution = model
self.reference_lamp = ref_lamp
self.evaluation_comment = eval_comment
self.spectral_dict = self.set_spectral_features(header)
self.solution_name = self.set_solution_name(header)
评论列表
文章目录