MegaMoveLevels

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.

Short answer. We mostly follow the paper’s Level II idea: cut the track to the deploy window, drop junk Argos classes, drop duplicates, remove land points for marine animals, then speed-filter, keep originals, and log what happened. We are not doing Level III (state-space smoothing). That is IMOS’s main product. One live mismatch: the repo currently uses a consecutive-hop speed rule, while the paper’s example uses trip::speedfilter. The locked lab decision is to go back to trip.

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.

1
Temporal bounds Keep only points between track start (or deploy time) and track end (or detachment / last fix). Needs deployment metadata.
2
Drop Argos Z Location class Z is not usable. Removed before geography and speed.
3
Duplicate timestamps Same animal, same time: keep one row.
4
Missing coordinates Drop rows without lat/lon.
5
Land filter For marine tags, delete points that fall on land. Shark Bay needs this; the paper’s pelagic blue-shark example skipped it.
6
Optional distance from deploy Off by default (max_dist_km = Inf). Only use when the animal should stay regional. Not required by the paper.
7
Speed filter Shark GAT runs at 4.5 m/s. Code today: consecutive hops (can drop first/last points). Paper example and locked decision: trip::speedfilter for interior spikes.
Do not reorder this. Time first, then quality and geography, then movement. Running speed before the deploy window would invent impossible hops from factory-test points (for example Seattle WC tests on tiger tags).

Does this follow the paper?

Yes Partial Extra No / not L2
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

MegaMove L2

Delete bad observations

Output is a subset of Argos points. Same coordinates the tag reported, minus rejects.

IMOS ATF

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

  1. Restore trip::speedfilter as the default speed step (paper-aligned).
  2. Keep max_dist_km optional and off by default.
  3. For leftovers like 226172 after trip, use a documented L1 flag / metadata note and remove at L2.
  4. Do not pretend L2 should behave like IMOS SSM.