ctdcal.flagging.by_residual

ctdcal.flagging.by_residual(data, ref_data, pressure, old_flags=None, flag_good=2, flag_bad=3, threshold=[0.002, 0.005, 0.01, 0.02], p_cutoff=[2000, 1000, 500])[source]

Flag residuals using specific thresholds for each pressure range.

Parameters
  • data (array-like) – Variable to be flagged

  • ref_data (array-like) – Reference data to compare against

  • flag_good (int, optional) – Flag value for good data

  • flag_bad (int, optional) – Flag value for data outside threshold

  • threshold (list of float, optional) – Threshold between good and bad values

  • p_cutoff (list of int, optional) – Edges of pressure bins

Returns

flags – Flag for each data point in input

Return type

array-like