Fit (sitelle.fit)¶
Introduction¶
Warning
For now, this module only works with a modified version of ORCS, not published yet !!
The fit module contains useful methods for fitting spectra. It has two specialized methods, fit_SN2 and fit_SN3 specifically dedicated to SN2 and SN3 filters, with a lot of default value to avoid some troubles.
Reference/API¶
sitelle.fit Module¶
Functions¶
sky_model_to_remove(mean_spectrum, axis, …) |
This function shifts the velocity of a skymodel to match at best the skylines in a spectrum. |
parse_line_params(rest_lines, fit[, error, …]) |
Parse the fitted parameters to display them as a nice DataFrame |
chi2_func(axis, spectrum, fit_params[, delta]) |
Computes a chi square value only around fitted lines. |
remove_OH_line(spectrum, theta, cube, **kwargs) |
Function used to remove the strange Halpha line around -400km/s (probably OH line). |
fit_gas_lines(z_dim, inputparams, params, …) |
This function fit lines in a given spectrum. |
guess_line_velocity(max_pos, v_min, v_max[, …]) |
Estimation of the velocity shift from a line position. |
guess_source_velocity(spectrum, cube[, …]) |
Estimation of the velocity shift of a spectrum. |
refine_velocity_guess(spectrum, axis, …[, …]) |
Refines a velocity guess with better accuracy, avoiding to have discrete guess corresponding to pixel numbers. |
fit_spectrum(spec, theta, v_guess, cube[, lines]) |
Helper function to simplify fitting, with some default parameters being already set. |
fit_source(xpos, ypos, cube[, v_guess, …]) |
Fit a spectrum from a position in the cube. |
check_fit(source, SN2_ORCS, SN3_ORCS, …) |
Convenience function to display a fit and visually check if it is meaningful. |
fit_SN2(source, cube[, v_guess, v_min, …]) |
Function specialized to fit sources found in the SN2 cube. |
fit_SN3(source, cube[, v_guess, lines, …]) |
Function specialized to fit sources found in the SN3 cube. |