fit_spectra_astropy

eispac.core.fit_spectra_astropy(inten, template, parinfo=None, wave=None, errs=None, min_points=10)[source]

Fit one or more EIS line spectra using mpfit.

Parameters:
  • inten (EISCube object or array_like) – One or more intensity profiles to be fit. The code will loop over the data according to its dimensionality. 3D data is assumed to be a full EIS raster (or a sub region), 2D data is assumed to be a single EIS slit, and 1D data is assumed to be a single profile.

  • template (EISFitTemplate object or dict) – Either an EISFitTemplate or the just a ‘template’ dictionary.

  • parinfo (dict, optional) – Dictionary of fit parameters formatted for use with mpfit. Required if the ‘template’ parameter is given just a dict and ignored otherwise.

  • wave (array_like, optional) – Associated wavelength values for the spectra. Required if ‘inten’ is given an array and ignored otherwise.

  • errs (array_like, optional) – Intensity error values for the spectra. Required if ‘inten’ is given an array and ignored otherwise.

  • min_points (int, optional) – Minimum number of good quality data points (i.e. non-zero values & errs) to be used in each fit. Spectra with fewer data points will be skipped. Default is 10.

Returns:

fit_res – An EISFitResult object containing the output fit paramaters.

Return type:

EISFitResult class instance