Utils module

Utils module contains core functions that are used by the processing classes of ORCS

orcs.utils.fit_lines_in_spectrum(params, inputparams, fit_tol, spectrum, theta_orig, snr_guess=None, max_iter=None, debug=False, **kwargs)

Basic wrapping function for spectrum fitting.

  • params – HDFCube.params dictionary
  • inputparams – orb.fit.InputParams instance.
  • fit_tol – fit tolerance.
  • spectrum – The spectrum to fit (1d vector).
  • theta_orig – Original value of the incident angle in degree.
  • snr_guess – Guess on the SNR of the spectrum. Necessary to make a Bayesian fit (If unknown you can set it to ‘auto’ to try an automatic mode, two fits are made - one with a predefined SNR and the other with the SNR deduced from the first fit). If None a classical fit is made. (default None).
  • max_iter – (Optional) Maximum number of iterations (default None)
  • kwargs – (Optional) Model parameters that must be changed in the InputParams instance.
orcs.utils.fit_velocity_error_model(x, y, vel, vel_err, nm_laser, calibration_laser_map, pixel_size, binning=6)

Fit a model of the spectral calibration error based on a simplified optical model of the interferometer.

  • x – Positions of the velocities along x axis
  • y – Positions of the velocities along y axis
  • vel – Measured velocity errors at (x, y)
  • vel_err – Uncertainty on the measured velocity errors.
  • nm_laser – Calibration laser wavelength in nm
  • calibration_laser_map – Calibration laser map
  • pixel_size – Pixel size in um
param binning: (Optional) Binning during computation (process is faster with
marginal precision loss) (default 6)