Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ Added:
- Optional fields `performance` (`schemas.InstrumentPerformance`: a ground sample distance and signal-to-noise ratio at a reference altitude, scaled to other altitudes by declared power laws, with `get_noise_scale` for observation errors) and `resources` (`schemas.InstrumentResources`: mass, power, and data rate, with `get_data_volume` and `total`) of instruments, which do not affect observations.
- Optional field `resources` of space systems (`schemas.SpacecraftResources`: launch and dry mass, power, design life, storage, and downlink rate), which constellations give their members, and `SpaceSystem.get_payload_resources`, the totals of its instruments.
- Catalog instruments and spacecraft give nominal performance and resources with the source of each value (`InstrumentEntry.performance` and `resources`, which a configuration may replace, `get_performance`, `get_resources`, and `Spacecraft.resources`), listed on the catalog's pages; they are not part of the digests of configurations. `InstrumentEntry.build` gives every instrument the performance and the instrument analyzed by default the resources, so that a satellite's totals count each instrument once, and `SatelliteSystem.build` gives satellites their spacecraft's resources.
- Catalog sample size configurations of MWS (`beams`, one instrument for each group of channels) and TROPICS (`beams_tropics_0n`, each satellite's 118 GHz band), whose published footprints at nadir and the scan's edge are gated, and of CERES (`beams_noaa_20`, `beams_suomi_npp`), ECOSTRESS and OCI (`beams`, OCI's with the tilt schedule of its swath), and IASI-NG (`fields_of_regard`), whose only published footprints are at nadir, so that they are compared without the gate and the configurations stay partial. Validation scripts can compare published footprints without recording the gate's metric (`scanner.Setup.gate_published`) and project the pixels of a line within a scan of several lines (`scanner.Reference.line`).
- Version 8 of the validation standard adds the sample size grade to the pushbroom class, with the gates of cross-track scanners. The grade is optional: pushbroom entries do not need it to be validated, and their sample size configurations have their own tiers, which do not set the entry's (`standard.get_required_grades`; `standard.is_compatible` takes a grade, as results of a grade added to a class apply from the version that added it).
- Catalog sample size configurations (`pixels`) of the pushbroom imagers BBR (gated by the published footprints of its nadir and slanted views), EMIT and TROPOMI (whose only published pixels are at nadir), and OLI and MSI (nominal, from published values, as no reference data locate their detectors). Published footprints of the validation scripts can give the angle along track of a view pointed fore or aft.
- Version 9 of the validation standard adds an optional sample size grade to the lidar, profiler, and altimeter classes, gated by published footprints and by the spacing of samples along track against that measured (`spacing_along_error`, the error of the median ratio, at most 3%).
- Catalog sample size configurations (`footprints`) of GEDI, ATLID, and CPR, from their published divergences and beam widths, whose spacing along track is gated and published footprints compared without the gate, and of ATLAS (nominal, as its reference data hold segments rather than shots). Validation scripts of beam instruments score them with `validation_io.validate_footprints`.
- `ViewGeometry.SCAN_ALONG_FIRST`: a `PointedInstrument` view in angles with the along-track angle first (its cross-track angular extent constant along track), as the fixed grid of a geostationary imager that sweeps about the y axis (CGMS's convention, as AHI's and FCI's); `ViewGeometry.SCAN` in the inertial frame is that of a grid that sweeps about the x axis (as ABI's). `ViewGeometry.is_scan` tells either from `FRAME`, and `compute_view_angles` takes `along_first`. `compute_sample_sizes` gives the sizes of a geostationary platform's pixels east-west (along track) and north-south (across track) in the inertial frame.
- Version 10 of the validation standard adds an optional sample size grade to the geostationary class, with the gates of cross-track scanners. Catalog sample size configurations (`pixels`) of ABI, AHI, and FCI: the fixed grids of their infrared bands, whose published sizes at the sub-satellite point are compared without the gate, as the grids' angles define them, with pixels and spacing compared with the products' grids (`validation_io.validate_fixed_grid`). Every configuration of ABI, AHI, and FCI uses the inertial frame, in which a geostationary satellite's along-track direction is east (the coverage configurations, cones about nadir, are unchanged by it), as the configurations of an entry on a platform share its velocity frame.
- `PointedInstrument` fields `range_resolution` (meters, in slant range, divided by the sine of the incidence angle at a target, or on the ground, `range_resolution_frame`) and `azimuth_resolution` (meters), which replace the sizes of a pixel's angles in `compute_sample_size` (and `compute_sample_sizes`), as for the resolution cells of a radar; their spacing is not modeled (`NaN`). Function `utils.compute_incidence_angle`: the incidence angle at a target on the ellipsoid.
- Version 11 of the validation standard adds an optional sample size grade to the SAR and scatterometer classes, gated by published resolutions. Catalog sample size configurations of Sentinel-1's IW mode (`resolution_iw`, its three sub-swaths' resolutions derived from the look bandwidths and windows of its ground range detected product, compared with the Product Definition's), and nominal ones of NISAR's single-look complex products of each bandwidth, and of the 2 km product of KaRIn and the 25 km product of ASCAT (`resolution`).
- `catalog.list_entries` takes a `grade`: the entries with a configuration for that use, whose `tier` is then the entry's for the grade (`InstrumentEntry.get_tier`, the lowest tier of its configurations that serve the grade), so that entries partial only at another grade, such as the sample size grade, can be listed as validated for coverage (`list_entries(tier="validated", grade="coverage")`).
- `catalog.list_systems` takes a `grade` as well: the systems with a configuration for that use, whose `tier` is then the system's for the grade (`SystemEntry.get_tier`), so that, for example, systems partial for the planes of their orbits can be listed as validated for their ground tracks (`list_systems(tier="validated", grade="ground_track")`).
- `tradespace.Criteria` take statistics themselves as objectives, tolerances, and rules of `Across`, and `Requirement` a statistic in place of its name (such as `Requirement(Quantile("cost", 0.7), "<=", 150)`), each named by its conventional name (`cost p70`), so that criteria need not repeat the names of statistics given in `statistics`. Type aliases `criteria.Objectives` (the objectives that functions judging designs take in place of criteria), `criteria.Direction`, `criteria.Rule`, `statistics.Operator`, `simulation.Sampling`, `attribution.Share`, and `utility.Form`, and `Literal` types of the other arguments that take one of a few strings (such as `errors` of `Study` and `method` of `DesignSpace.sample`), by which editors check and complete them.

Changed:
Expand All @@ -28,6 +39,7 @@ Changed:
- A function of a study's results (such as the `evaluate` of a `tradespace.Study`, or the metrics of an `ObservationStudy`) whose first parameter is named `design` is given what it is of (such as what a design builds) in it, rather than raising a `TypeError`; a later parameter named `design` is given the realized design, as before.

Fixed:
- Sample sizes of `PointedInstrument` views in scan angles away from their scan line: a step of the cross-track angle moves the line of sight by the cosine of the target's along-track angle, along the axes of the view rotated to the target. Pixels off the scan line, such as those of a geostationary imager's fixed grid, were up to about 0.4% too wide across track within 5 deg of it (unchanged on the scan line).
- `GeosynchronousOrbit` placed its satellite off its `longitude` by up to about 0.04 deg, by the date: its node used the apparent rather than the mean sidereal time of SGP4's TEME frame, and SGP4's deep-space (lunar and solar) terms displace the satellite at its epoch from its mean elements. The node is now solved so that the sub-satellite point at epoch is at the longitude (rotated by the argument of latitude), within 1e-6 deg; within each day of the repeat cycle, the longitude still drifts by up to about 0.006 deg. GOES's slot record is updated (its longitude error had been 0.037 deg).
- Catalog values of sourced models (such as a spacecraft's resources) set to `None`, as a model dumped with its defaults gives them, needed a provenance, so a system's record could not be written.
- `analysis.collect_footprint_observations` failed for the footprints of radar stations with pandas 3.
Expand Down
37 changes: 32 additions & 5 deletions docs/validation/catalog_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,30 @@
import re

from tatc.catalog import STANDARD_VERSION, get_entry, get_entry_ids
from tatc.catalog.standard import MIN_HOLDOUT_GAP_DAYS
from tatc.catalog.standard import MIN_HOLDOUT_GAP_DAYS, get_required_grades, serves

REPOSITORY = "https://github.com/code-lab-org/tatc/blob/main/"


def is_optional(entry, grade) -> bool:
"""
Checks whether a configuration's grade is optional for its entry's class: it
serves none of the grades the class requires, so its tier does not set the
entry's.

Args:
entry (InstrumentEntry): The entry.
grade (Grade): The configuration's grade.

Returns:
bool: `True`, if the grade is optional.
"""
return not any(
serves(grade, required)
for required in get_required_grades(entry.instrument_class)
)


def escape(text: str) -> str:
"""
Escapes reStructuredText markup in plain text.
Expand Down Expand Up @@ -131,7 +150,9 @@ def render_configuration(entry, key: str) -> str:
parts = [
heading(f"``{key}``{default}", "-"),
f"**Tier:** `{validation.tier.value}`. **Grade:** "
f"`{configuration.grade.value}`. **Tested on:** "
f"`{configuration.grade.value}`"
+ (" (optional)" if is_optional(entry, configuration.grade) else "")
+ ". **Tested on:** "
+ ", ".join(names[p] for p in configuration.platforms)
+ ".\n",
escape(configuration.description) + "\n",
Expand Down Expand Up @@ -332,8 +353,9 @@ def render() -> str:
f"``{e.instrument_class.value}``",
f"`{e.validation.tier.value}`",
", ".join(
f"``{key}`` ({c.grade.value}, "
f"{e.validation.configurations[key].tier.value})"
f"``{key}`` ({c.grade.value}"
+ (", optional" if is_optional(e, c.grade) else "")
+ f", {e.validation.configurations[key].tier.value})"
for key, c in e.configurations.items()
),
", ".join(p.name for p in e.get_spacecraft()),
Expand All @@ -358,7 +380,11 @@ def render() -> str:
An entry's tier is computed from its results and the thresholds of
:doc:`standard` (version {STANDARD_VERSION}), and cannot be declared. Values fitted
to reference data are tested on data at least {MIN_HOLDOUT_GAP_DAYS} days from
their fitting data. A `partial` entry can still be useful within its
their fitting data. An entry's tier is set by its configurations at the
grades its class requires; configurations at an optional grade (the sample size
grade of the pushbroom, lidar, profiler, altimeter, geostationary, SAR, and
scatterometer classes) have their own tiers, which do not set the entry's. An entry's tier for a use is that of its weakest
configuration at the use's grade (`get_tier`), by which entries can be listed. A `partial` entry can still be useful within its
limitations, which each configuration lists below; a `validated` entry also has
limitations.

Expand All @@ -367,6 +393,7 @@ def render() -> str:
from tatc.catalog import get_entry, list_entries

list_entries(tier="validated")
list_entries(tier="validated", grade="coverage") # validated for coverage
entry = get_entry("atms")
entry.validation # tier, gate results, and gaps of each configuration
satellite = entry.to_satellite(orbit, time_step=10, platform="noaa-21")
Expand Down
Loading