slv.measurements.mobile.obs.build_trax_obs#

slv.measurements.mobile.obs.build_trax_obs(site='trx01', time_range=None, num_processes=1, windows=None, classify=True, low_pressure=(100.0, 145.0), slope_tol=0.05, pressure_band=(135.0, 145.0), dropout_window=8, recover_hot=True, chunk='YS', **gps_kwargs)[source]#

Build the georeferenced TRAX CH4 record from the pipeline levels.

Sources, each tagged in cal_source (see CAL_SOURCES): lgr_ugga calibrated → pipeline; lgr_ugga_manual_cal qaqc → manual_cal; lgr_ugga qaqc inside the uncalibrated windows (default: the packaged table) → uncalibrated. QC via normalize_pollutant() (flags {0,1,2,-64,-140}, ID −10, valid range). Manual-cal rows flagged −63 (cavity pressure outside 135–145 torr) are kept when the pressure is inside low_pressure (default LOW_PRESSURE_BAND), and every manual-cal row whose measured pressure is inside that band and outside 135–145 torr is tagged low_pressure=True, whatever its flag (apply_low_pressure_rule()); low_pressure=None drops the −63 rows and tags none. Pipeline-calibrated rows whose slope deviates more than slope_tol from the day’s median slope are dropped (apply_slope_guard(); one bad reference period otherwise miscalibrates the next hour by 20–100 %). Then merged with every GPS fix by merge_with_gps() (no route buffer, no storage-yard removal) and, with classify, labelled per minute by label_trax_location() (state, indoor, yard_name) so that the location filter is applied at load time (load_trax_obs()). Pass routes / storage_polygon in gps_kwargs to restore the old pre-filtering.

num_processes is the number of processes that read the pipeline files and, in the location step, that read the GPS files and measure the fixes’ distance to the track and the yards (label_trax_location()).

The archive is processed in chunk-sized pieces (pandas offset alias, default one year) so that only one chunk of full-width pipeline files is in memory at a time (the whole-archive read peaked at 250 GB). Still heavy — run on a compute node.

Return type:

GeoDataFrame