refine_velocity_guess

sitelle.fit.refine_velocity_guess(spectrum, axis, v_guess, detected_line, return_fit=False)

Refines a velocity guess with better accuracy, avoiding to have discrete guess corresponding to pixel numbers. A gaussian function is fitted to estimate the line position.

Parameters:
  • spectrum (1D ndarray) – The spectrum containing emission lines
  • axis (1D ndarray) – The corresponding axis, in wavenumber
  • v_guess (float) – A first guess on the velocity, typically obtained from guess_source_velocity()
  • detected_line (str) – Names of the main line present in the spectrum (as defined here)
  • return_fit (bool, Default = False) – (Optional) If True, returns the fit parameters, for further investigation
Returns:

v – The updated velocity guess

Return type:

float