How far to trust it
egms_client.reliability ¶
How far to trust an EGMS velocity at a place: an estimate, declared as such.
EGMS publishes no map of how much each cell can be trusted. This module makes one from outside, from what the archive does give, and says which parts it knows:
- coverage: the share of 100 m cells with a value within
radius_m. The radar measures where it finds stable targets (buildings, rock, bare ground). Under trees, on fields that change, under snow, it finds few or none. A lone cell in an empty neighbourhood is a weak answer, and a place with no cell is not measured: never zero. - fit: how well the archive's model fits the cell's series, from
rmse_ts(mm) in the L3 CSV. Only when its attributes are given.
score is the smallest of the parts that are known, from 0 to 1, and
reliable is score >= RELIABLE_FROM. Each part that pulls the score
down gives its reason in words.
The thresholds are choices, not measurements: they are stated here and
checked on the benchmark of known places (benchmarks/), where blind
places must come out unreliable, and moving and still ones reliable.
What the estimate cannot see, and does not pretend to:
- motion too fast for InSAR (more than about a centimetre between two passes is lost, not measured as slow);
- motion north-south (the satellites fly almost north-south and do not see it);
- anything after the end of the release window, or smaller than a 100 m cell;
mean_velocity_std: the archive's formal error is at most 0.3 mm/year in 95 % of the cells of the benchmark, and at most 0.2 in a forest where 99 % of the cells are empty. It is reported, not trusted.
regional_median is the median velocity within regional_radius_m:
EGMS velocities carry regional offsets (+1.6 mm/year east-west at the Murge,
a place that does not move), so a velocity reads better against its region
than against zero. relative is the velocity minus that median.
Needs the raster extra; attributes need the tables extra.
Reliability
dataclass
¶
How far to trust the L3 velocity at a point. None: not known.
trust ¶
trust(tiffs: Iterable[Path], lon: float, lat: float, *, attributes: Any = None, radius_m: float = RADIUS_M, regional_radius_m: float = REGIONAL_RADIUS_M) -> Reliability
How far to trust the L3 velocity of the cell at (lon, lat).
tiffs are the L3 GeoTIFFs of one component around the point (the
tiles :meth:~egms_client.EgmsArchive.fetch_tile returns).
attributes, optional, is the L3 CSV of the same component as a
DataFrame (easting, northing, rmse_ts, mean_velocity_std):
without it, fit is unknown and does not count.
coverage_map ¶
coverage_map(values: Any, *, radius_m: float = RADIUS_M, pixel: float = 100.0) -> Any
For every cell of a grid, the share of cells with a value within radius_m.
values is a 2-D array (a :class:~egms_client.mosaic.Mosaic's
values), NaN where there is no data. The edges count only the cells
inside the grid. Same shape, float32.