import marimo __generated_with = "0.21.1" app = marimo.App( width="medium", app_title="Naming Convention & Validation", css_file="canvod_nordic.css", ) @app.cell def _(): import marimo as mo return (mo, ) @app.cell def _(mo): mo.md(r""" # Naming Convention and File Validation GNSS-Transmissometry campaigns generate thousands of files across multiple receivers, days, and sampling intervals. Without a strict naming convention, duplicate or misattributed files can silently corrupt a dataset. The **canvod-virtualiconvname** package is the single source of truth for GNSS filename conventions in canvodpy. It provides: 1. **`CanVODFilename`** — a structured parser for the IGS-derived long-name convention 2. **`BUILTIN_PATTERNS`** — regex patterns for recognising RINEX v2, RINEX v3, Septentrio SBF, and canVOD filenames 3. **`FilenameMapper`** — maps physical files on disk to canonical names 4. **`DataDirectoryValidator`** — pre-pipeline hard gate that rejects unmapped files and temporal overlaps before any data is read The naming convention encodes station identity, receiver role, time window, sampling rate, and file type into a single, self-describing filename. This eliminates ambiguity when ingesting data from multiple receivers and time periods. --- """) return @app.cell def _(mo): mo.md(r""" ## The canVOD filename convention ``` ROSA01TUW_R_20250010000_15M_05S_AA.rnx ^^^|^|^^^ ^^^^|^^^|^^^^ ^^^ ^^^ ^^ SIT T NN AGC YYYY DOY HHMM PER SMP PH TYPE ``` | Field | Chars | Description | Example | |-------|-------|-------------|---------| | **SIT** | 3 | Site identifier (uppercase) | `ROS` | | **T** | 1 | Receiver type: `R`=reference, `A`=active (canopy) | `A` | | **NN** | 2 | Receiver number (01--99) | `01` | | **AGC** | 3 | Operating agency (uppercase) | `TUW` | | `_R_` | 3 | Separator (RINEX convention) | | | **YYYY** | 4 | Year | `2025` | | **DOY** | 3 | Day of year (001--366) | `001` | | **HHMM** | 4 | Start hour and minute (UTC) | `0000` | | **PER** | 3 | File duration (`15M`, `01H`, `01D`) | `15M` | | **SMP** | 3 | Sampling interval (`05S`, `01S`) | `05S` | | **PH** | 2 | Reserved; ignored during parsing | `AA` | | **TYPE** | 3+ | File extension (`rnx`, `sbf`, `nmea`) | `rnx` | This convention extends the [IGS long-name standard](http://acc.igs.org/misc/rinex304.pdf) (page 14f) with a receiver-type field (`T`) that distinguishes reference and canopy receivers at the same site. ![IGS long-name convention](public/IGS_long_name_convention.png) """) return if __name__ == "__main__": app.run()