slv.measurements.mobile.transects.build_network_transects#
- slv.measurements.mobile.transects.build_network_transects(obs, points, lag=None, max_point_dist=60.0, max_gap='10min', reversal_m=500.0, min_span_m=1000.0, max_dwell_s=180.0, species='CH4_ppm', return_samples=False)[source]#
Build the
[transect, point]matrix of one obs frame on the network points.- Parameters:
obs (
DataFrame) – Georeferenced samples withTime_UTC,Longitude_deg,Latitude_degand thespeciescolumn (obs.parquetrows;cal_sourceandlow_pressureare summarised per transit when present). Any order; sorted here.points (
GeoDataFrame) –load_trax_network_points()(any CRS; needspoint,lines,segmentand thes_<line>columns).lag (
float|DataFrame|None) – Inlet lag:None, seconds, or the per-epoch table withstart/end/lag_s(inlet_lag_seconds()).max_point_dist (
float) – Snap radius to a network point [m]; farther samples are off-network.max_gap (
str|Timedelta) – A transit (and a run for the line assignment and lag) ends at a longer gap.reversal_m (
float) –lair.transects.split_transits(): turning-point prominence that ends a transit, and the shortest along-route span kept.min_span_m (
float) –lair.transects.split_transits(): turning-point prominence that ends a transit, and the shortest along-route span kept.max_dwell_s (
float|None) –lair.transects.transect_matrix(): samples at a point later than this after the transit first reached it are dropped (terminus dwells).return_samples (
bool) – Also return the per-sample assignment (Time_UTC,x,ylagged UTM position,point(-1 off-network),line(""unresolved),transit(-1 not in a kept transit)), for diagnostics.
- Returns:
dims
transectxpoint; variablesobs(ppm),time(mean POSIX s of the samples in the cell) andn(samples); point coordspoint(network id),lon,lat,lines,segment,s_<line>; transect coordsline,direction(+1 with increasings),heading(compass letter of travel),t_start,t_end,s_min,s_max,n_fix,n_points(points with data),coverage((s_max - s_min)over that line’s full known extent – a short turn or a partial run reads well below 1; see the module docstring),lag_s,lag_source, andfrac_uncalibrated/frac_low_pressurewhen the tags are present. Attributes record every parameter.- Return type:
xarray.Dataset