Baseline.UvdiffBaseline

Baseline.UvdiffBaseline#

Baseline.UvdifflBaseline.py

get_uvdiff_baseline_info(uv_data, pickat=400)#

Get the parameters and baseline for UVDIFF baseline fitting.

Note that, in 2D cases, this function is called only once instead of every call to the baseline computation.

Parameters:
  • uv_data (UvData) – The UvData object containing the data for baseline estimation.

  • pickat (int, optional) – The index at which to pick the second curve for UVDIFF baseline estimation. Default is 400.

Returns:

  • params (dict) – A dictionary containing the estimated parameters for the UVDIFF baseline.

  • dy (array-like) – The difference between the two curves used for baseline estimation.

  • uvdiff_baseline (array-like) – The estimated UVDIFF baseline.

compute_uvdiff_baseline(x, y, uvdiff_info, return_also_params=False, **kwargs)#

Compute the UVDIFF baseline. :param x: The x-axis data (wavelengths). :type x: array-like :param y: The y-axis data (intensities). :type y: array-like :param uvdiff_info: A tuple containing the parameters, dy, and uvdiff_baseline. :type uvdiff_info: tuple :param return_also_params: If True, the function returns a tuple containing the baseline and a dictionary with parameters.

If False, it returns only the baseline.

Returns:

  • baseline (array-like) – The computed UVDIFF baseline.

  • params (dict, optional) – A dictionary containing the parameters used for baseline computation, if return_also_params is True.