pyrfu.pyrf.mean_field module#

pyrfu.pyrf.mean_field.mean_field(inp: DataArray, deg: int) Tuple[DataArray, DataArray][source]#

Estimate the mean and wave fields.

The mean field is computed by fitting a polynomial of degree deg to the input data. The wave field is then computed as the difference between the input data and the mean field.

Parameters:
  • inp (DataArray) – Input data.

  • deg (int) – Degree of the polynomial.

Returns:

Mean field and wave field.

Return type:

Tuple

Raises:

TypeError – If input is not a xarray.DataArray.