test_unitTestTabularAtmosphere
- test_unitTestTabularAtmosphere.test_gram_csv_rejects_invalid_first_row(tmp_path, first_row)[source]
Reject malformed samples and incompatible units even when a valid data row follows.
- test_unitTestTabularAtmosphere.test_gram_csv_rejects_wrong_row_width(tmp_path, profile)[source]
Reject records whose field count differs from the header, including unused columns.
- test_unitTestTabularAtmosphere.test_gram_csv_requires_finite_numbers(tmp_path, rows)[source]
Reject Boolean fields and nonfinite samples anywhere in a GRAM profile.
- test_unitTestTabularAtmosphere.test_gram_csv_with_extra_named_columns(tmp_path)[source]
Read the required fields by name when an unused field contains a quoted comma.
- test_unitTestTabularAtmosphere.test_gram_csv_with_units_row(tmp_path, csv_rows)[source]
Read a user-supplied GRAM CSV with a units row and descending altitudes.
- test_unitTestTabularAtmosphere.test_gram_surface_row(planet, row_count, density, temperature)[source]
Read the complete nominal profile, including the surface sample.
- test_unitTestTabularAtmosphere.test_oblate_jupiter_table_top(altitude, density, temperature)[source]
Evaluate the top of the Jupiter profile using height above the reference ellipsoid.
- test_unitTestTabularAtmosphere.test_tabularAtmosphere(altitude, accuracy, useMinReach, useMaxReach)[source]
Validation Test Description
TabularAtmosphere interpolates from user-provided data to compute density and temperature at the current s/c altitude. The unit test checks altitudes at, between, above, and below the values included in the table. This test uses a python helper function to provide data from EarthGRAM (see supportDataAtmosphereDatasupport). Data lists can also be manually-input, but check sorting and units per documentation and support info (above). The module returns 0 for both density and temperature if ANY ONE of the following conditions is met:
altitude below minimum value in provided table
altitude above maximum value in provided table
altitude below envMinReach
altitude above envMaxReach
Note that this results in nonphysical behavior for temperature (absolute zero) when outside defined range.
Test Parameters
Args:
altitude (float): Spacecraft altitude for which density, temperature are returned
accuracy (float): accuracy value used in validation tests
useMinReach (bool): set value of envMinReach
useMaxReach (bool): set value of envMaxReach
Description of Variables Being Tested
The unit test checks density (kg/m^3) and temperature (K) against their expected values:
densData[0]tempData[0]