simtools-compare-atmospheres#

Compare atmospheric profile and transmission model parameters.

Compare one or more atmospheric profile and transmission model parameters. Give the site, profile, and transmission for each atmosphere. Profile and transmission are each either a parameter version read from the configured simulation-model repository or a path to an ECSV file (suffix .ecsv); any mix is allowed. ECSV files are validated against the model-parameter schema. The first atmosphere is the reference. Repeating the same combination is not supported.

simtools-compare-atmospheres \
    --atmosphere North 1.0.0 1.0.0 \
    --atmosphere North path/to/atmospheric_profile.ecsv 2.0.0

The application writes profile figures for density, atmospheric depth, refractivity, temperature, pressure, and water-vapor partial pressure against altitude, with absolute differences from the first profile on the overlapping altitude range and relative differences in percent in a separate row. It writes a separate figure showing direct transmission and differences from the reference at altitudes above sea level: top of atmosphere, 20 km, 10 km, 5 km, the highest observation height plus 1.5 km and 0.5 km. The two lowest panel titles show their resulting absolute a.s.l. heights. The transmission difference plots show relative differences in percent. It also writes atmosphere_summary.json with model identities and numerical comparisons. Transmission is calculated as exp(-optical depth) at an emission altitude of 10 km above sea level. The requested transmission levels are interpolated in optical depth, with linear extrapolation where a table does not reach a requested level. Each transmission table uses its own recorded observation level; comparisons can therefore include different path endpoints. All relative-difference axes use a symmetric range of ±35% by default. Override this with the relative_difference_limit command-line argument. With --fallback_to_candidate, a missing reference ECSV produces candidate-only plots. The JSON summary records the missing reference and the science-test acceptance rule marks the result as a warning. The summary reports unweighted differences over common tabulated wavelengths. A value is required at 10 km in each transmission table and each profile must cover that altitude. Missing wavelength cells are not interpolated. Direct transmission does not account for light scattered into the camera or predict instrument response.

Command line arguments#

options#

–help

show this help message and exit

–atmosphere

Atmosphere input; repeat to compare. The first input is the reference. PROFILE and TRANSMISSION are each a parameter version or a path to an ECSV file.

Required.

–relative_difference_limit

Symmetric relative-difference axis limit in percent.

Default: 35.0.

–fallback_to_candidate

Plot candidate atmospheres when the reference ECSV is missing, and record the fallback in the summary.

model repository#

–simulation_models_path

Path containing the simulation-model repository to read.

–simulation_models_git_path

Path to a local normal, bare, or mirror Git repository containing simulation models.

–simulation_models_git_revision

Git tag, ref, or commit to read from the simulation-model repository.

application#

–show_options

Print available values for a supported option and exit.

Example#

Compare atmospheric models#

Compare North and South profiles and their atmospheric transmission.

Application: simtools-compare-atmospheres

Integration test: compare_atmospheres_north_south.yml

Command

simtools-compare-atmospheres --config tests/integration_tests/config/compare_atmospheres_north_south.yml

Configuration

atmosphere:
- - North
  - 1.0.0
  - 1.0.0
- - South
  - 1.0.0
  - 1.0.0
figure_format:
- png
output_path: simtools-output