fit_redshift¶
- msaexp.spectrum.fit_redshift(file='jw02767005001-02-clear-prism-nrs2-2767_11027.spec.fits', z0=[0.2, 10], zstep=None, eazy_templates=None, nspline=None, scale_disp=1.3, vel_width=100, Rline=None, is_prism=False, use_full_dispersion=False, ranges=None, sys_err=0.02, **kwargs)[source]¶
Fit spectrum for the redshift
- Parameters
- filestr
Spectrum filename
- z0(float, float)
Redshift range
- zstep(float, float)
Step sizes in
dz/(1+z)- eazy_templateslist, None
List of
eazy.templates.Templateobjects. If not provided, just use dummy spline continuum and emission line templates- nsplineint
Number of splines to use for dummy continuum
- scale_dispfloat
Scale factor of nominal dispersion files, i.e.,
scale_disp > 1increases the spectral resolution- vel_widthfloat
Velocity width the emission line templates
- Rlinefloat
Original spectral resolution used to sample the line templates
- is_prismbool
Is the spectrum from the prism?
- use_full_dispersionbool
Convolve
eazy_templateswith the full wavelength-dependent dispersion function- rangeslist of tuples
Wavelength ranges for the subplots
- sys_errfloat
Systematic uncertainty added in quadrature with nominal uncertainties
- Returns
- figFigure
Diagnostic figure
- sp
Table A copy of the 1D spectrum as fit with additional columns describing the best-fit templates
- datadict
Fit metadata