decode.fit module#

baseline(dems: DataArray, /, *, order: int = 0, model: str = 'LinearRegression', weight: ndarray[Any, dtype[float64]] | float | None = None, **options: Any) DataArray[source]#

Fit baseline by polynomial and atmospheric models.

Parameters:
  • dems (DataArray) – DEMS DataArray to be fit.

  • order (int) – Maximum order of the polynomial model.

  • weight (ndarray[Any, dtype[float64]] | float | None) – One-dimensional weight along channel axis. If it is a scalar, then (dtau/dpwv)^weight will be used. It is only for 'LinearRegression' or 'Ridge' models.

  • model (str) – Name of the model class in sklearn.linear_model.

  • options (Any) – Optional arguments used for the model initialization.

Returns:

DataArray of the fit baseline.

Return type:

baseline