glidertools.processing.calc_oxygen

glidertools.processing.calc_oxygen(o2raw, pressure, salinity, temperature, auto_conversion=True, spike_window=7, spike_method='median', savitzky_golay_window=0, savitzky_golay_order=2, verbose=True)

This function processes oxygen.

It is assumed that either mL/L or umol/kg are passed as input. The units are automatically detected by looking at the mean ratio. Below are some conversions to help with the Oxygen units:

>>> µmol/l > µmol/kg * 1.025
    µmol/l > ml/l * 44.66
    µmol/l > mg/l * 31.25
Parameters:
  • o2raw (array, dtype=float, shape=[n, ]) – raw oxygen without unit conversion
  • pressure (array, dtype=float, shape=[n, ]) –
  • salinity (array, dtype=float, shape=[n, ]) –
  • temperature (array, dtype=float, shape=[n, ]) –
  • conversion (bool=True) – tries to determine the unit of oxygen based on o2raw values. The user needs to do a manual conversion if False
  • spike_window (int=7) – rolling window size to apply for the cleaning.despike function.
  • spike_method (string='median') – can be ‘median’ or ‘minmax’. see cleaning.despike for more info.
  • savitzky_golay_window (int=0) – rolling window size for cleaning.savitzky_golay function
  • savitzky_golay_order (int=2) – polynomial order for cleaning.savitzky_golay function
  • verbose (bool=True) –
Returns:

  • o2mll (array, dtype=float, shape=[n, ]) – oxygen concentration in mL/L (if unit auto_conversion is set True)
  • o2pct (array, dtype=float, shape=[n, ]) – theoretical oxygen saturation percentage
  • o2aou (array, dtype=float, shape=[n, ]) – aparent oxygen utilisation based on measured oxygen and oxygen saturation.

Note

To Do: Oxygen processing should have its own section to be consistent