What our L2 cleaning code does
Plain map of the MegaMove shark/turtle/dugong QC path: the order of filters, whether that matches Sequeira et al. 2021, and how IMOS sits at a different product level.
Code: code/R/03_curate_l1_to_l2.R via code/examples/GAT/run_workflow_*.R. Paper: Sequeira et al. 2021, Methods in Ecology and Evolution (10.1111/2041-210X.13593). Companion example: OTN biologging_standardization blue-shark workflow.
What “Level II” means here
The paper describes product levels, not a single mandatory filter script. Level I is decoded points (researcher can flag). Level II is curated observed points (still the original fixes, bad ones removed). Level III is an interpolated / SSM track. MegaMove L2 is keep-or-drop on observed Argos points. It does not invent new coordinates.
Sequence in our code
This is the order inside curate_l1_to_l2() today.
Does this follow the paper?
| Paper / OTN example expects | MegaMove now | Notes |
|---|---|---|
| L2 is cleaned observed points, not interpolated | Yes | L0 / L1 / L2 files kept |
| Use deployment metadata for start/end | Yes | trackStart / deploy / end / detachment |
| Remove pre-deploy and post-detachment points | Yes | Step 1 |
| Land filter for exclusively marine animals | Yes | On for GAT marine workflows |
| Speed filter (example: trip::speedfilter ~4 m/s) | Partial | We speed-filter, but consecutive hops in code; decision is to restore trip |
| Drop Argos Z | Yes | OTN companion step |
| Drop duplicate times | Yes | OTN companion step |
| Log every curation step | Yes | logger, interim CSVs, QC plots |
| Researcher L1 flags cleared at L2 | Partial | Metadata-driven today; no separate L1 flag column yet |
| If filters miss a ghost, remove it and record it | Partial | Paper allows a documented manual exception. Optional max_dist_km is an automated stand-in, not the paper text |
| Level III SSM | No | Correct for L2. SSM is a later product |
The NZ ghost in one paragraph
PTT 226172 kept a May 2022 Tasman Sea fix in older L2 (~−35°, ~160°), then a Shark Bay fix ~95 minutes later. Land cannot catch open-ocean Argos junk. Classic trip::speedfilter protects the first two and last points, so once the time window made that Tasman fix the first remaining point, trip left it alone. That is endpoint design, not a bug in Sumner’s code. The paper’s companion answer for leftovers is: remove the point and write it down. Distance-from-deploy is optional domain QC, not a required paper step.
IMOS, for contrast only
Delete bad observations
Output is a subset of Argos points. Same coordinates the tag reported, minus rejects.
Estimate the path
Truncate to at-sea window, lightly pre-filter extremes, fit an SSM, optionally reroute off land. New lat/lon + uncertainty. That is Level III behaviour.
IMOS Best Practice Manual (Jonsen, McMahon & Harcourt 2024) and ArgosQC / aniMotum. Their speed pre-filter also protects ends. Ghosts usually get absorbed by the model, not deleted from a curated L2 file.
What to do next in the repo
- Restore trip::speedfilter as the default speed step (paper-aligned).
- Keep max_dist_km optional and off by default.
- For leftovers like 226172 after trip, use a documented L1 flag / metadata note and remove at L2.
- Do not pretend L2 should behave like IMOS SSM.