pelagos_py.steps.processing.find_profiles#
- class pelagos_py.steps.processing.find_profiles.FindProfilesStep(name, parameters=None, diagnostics=False, context=None)[source]#
Bases:
pelagos_py.steps.base_step.BaseStep,pelagos_py.utils.qc_handling.QCHandlingMixinIdentifies and classifies vertical and horizontal profiles from depth-time data.
The step smooths the depth (or pressure) record, derives vertical velocity and acceleration, and uses these to label every measurement with a scientific phase. From those phases it then derives a continuous
PROFILE_NUMBER, aPROFILE_DIRECTION, aCYCLEcount, and a per-profile verticalPROFILE_GRADIENT.All parameters are optional — every parameter has a sensible default, so the step runs unchanged on a typical OG1 dataset with no configuration at all (see the first example below). The parameters exist only to tune the classification for unusual platforms, sampling rates, or dive patterns.
- generate_diagnostics(mapped_df, depth_col)[source]#
Plot the derived phase classification and profile/cycle numbering.
Called automatically at the end of
run()whendiagnosticsis enabled. Produces a two-panel figure for visually checking that profiles were identified correctly.The upper panel shows the depth (or pressure) record against time, with every measurement coloured by its scientific phase — ascent, descent, surfacing, parking, propelled, inflection and transition (see the class description for the full phase definitions). The legend reports the number of points assigned to each phase. This makes it easy to confirm that each turn is bracketed by a single inflection point at its apex, with the surrounding turn marked as transition and the near-surface portions marked as surfacing.
The lower panel shows the derived
PROFILE_NUMBER(each ascent/descent core, extended to include the adjacent transition/inflection on either side) and theCYCLEnumber against time, so the continuity of the numbering can be checked at a glance.