text string |
|---|
::test_arrays_are_well_formed_and_on_the_supplied_grid PASSED [ 50%] |
::test_reported_forward_histories_match_independent_solver FAILED [ 60%] |
::test_blind_sensor_residuals_are_at_the_noise_floor FAILED [ 70%] |
::test_flux_histories_match_withheld_injections PASSED [ 80%] |
::test_flux_energy_and_peak_are_recovered_and_self_consistent PASSED [ 90%] |
::test_summary_is_consistent PASSED [100%] |
=================================== FAILURES =================================== |
____________ test_calibration_within_declared_bounds_and_recovered _____________ |
def test_calibration_within_declared_bounds_and_recovered(): |
calibration = reported_calibration() |
vector = np.array( |
[ |
calibration["conductivity_scale"], |
calibration["depth_offset_m"], |
*calibration["sensor_time_constants_s"], |
], |
dtype=float, |
) |
bounds = CONFIG["calibration_bounds"] |
lower = np.array( |
[ |
bounds["conductivity_scale"][0], |
bounds["depth_offset_m"][0], |
bounds["sensor_time_constants_s"][0][0], |
bounds["sensor_time_constants_s"][1][0], |
] |
) |
upper = np.array( |
[ |
bounds["conductivity_scale"][1], |
bounds["depth_offset_m"][1], |
bounds["sensor_time_constants_s"][0][1], |
bounds["sensor_time_constants_s"][1][1], |
] |
) |
assert np.all(vector >= lower) and np.all(vector <= upper) |
assert abs(vector[0] - CAL_TRUE[0]) <= 0.05, "conductivity scale not calibrated" |
assert abs(vector[1] - CAL_TRUE[1]) <= 5.0e-5, "sensor depth offset not calibrated" |
> assert abs(vector[2] - CAL_TRUE[2]) <= 0.018, "near-probe time constant not calibrated" |
E AssertionError: near-probe time constant not calibrated |
E assert 0.026175878027679858 <= 0.018 |
E + where 0.026175878027679858 = abs((0.09817587802767985 - 0.072)) |
/verifier/test_outputs.py:161: AssertionError |
_______________ test_calibration_reproduces_all_known_flux_shots _______________ |
def test_calibration_reproduces_all_known_flux_shots(): |
calibration = reported_calibration() |
t_s = CALIBRATION_DATA["t_s"].astype(float) |
measured = CALIBRATION_DATA["temperature_K"].astype(float) |
known_flux = CALIBRATION_DATA["known_flux_W_m2"].astype(float) |
noise = CALIBRATION_DATA["noise_std_K"].astype(float) |
predictions = [] |
for q in known_flux: |
prediction, _ = simulate(t_s, q, CONFIG, calibration, nx=83, cfl=0.31) |
predictions.append(prediction) |
predictions = np.asarray(predictions) |
rms = float(np.sqrt(np.mean((predictions - measured) ** 2))) |
assert rms <= CALIBRATION_RMS_RATIO_MAX * float(np.mean(noise)) |
> assert abs(float(calibration["calibration_rms_K"]) - rms) <= 0.75 * float( |
np.mean(noise) |
) |
E assert 0.0482322620574334 <= (0.75 * 0.0575) |
E + where 0.0482322620574334 = abs((0.07289191383040161 - 0.12112417588783501)) |
E + where 0.07289191383040161 = float(0.07289191383040161) |
E + and 0.0575 = float(0.0575) |
E + where 0.0575 = <function mean at 0x7c775158a030>(array([0.05 , 0.065])) |
E + where <function mean at 0x7c775158a030> = np.mean |
/verifier/test_outputs.py:178: AssertionError |
___________ test_reported_forward_histories_match_independent_solver ___________ |
def test_reported_forward_histories_match_independent_solver(): |
for index, shot_id in enumerate(SHOT_IDS): |
_, _, _, surface, predicted = shot_entry(shot_id) |
reference_sensor, reference_surface = reference_forward(index) |
> assert np.sqrt(np.mean((predicted - reference_sensor) ** 2)) <= 0.12, ( |
f"{shot_id}: predicted_sensor_K is not from the reported model and flux" |
) |
E AssertionError: blind_01: predicted_sensor_K is not from the reported model and flux |
E assert 0.13865697392003495 <= 0.12 |
E + where 0.13865697392003495 = <ufunc 'sqrt'>(0.01922575641666125) |
E + where <ufunc 'sqrt'> = np.sqrt |
E + and 0.01922575641666125 = <function mean at 0x7c775158a030>(((array([[293.15 , 293.15004079, 293.1501771 , 293.15045331,\n 293.15089747, 293.15152417, 293.15233897, 293.15334207,\n 293.15453073, 293.15590073, 293.15751029, 293.15961827,\n 293.16267989, 293.16725864, 293.173... |
E + where <function mean at 0x7c775158a030> = np.mean |
/verifier/test_outputs.py:204: AssertionError |
______________ test_blind_sensor_residuals_are_at_the_noise_floor ______________ |
def test_blind_sensor_residuals_are_at_the_noise_floor(): |
measured = BLIND_DATA["temperature_K"].astype(float) |
for index, shot_id in enumerate(SHOT_IDS): |
entry, _, _, _, _ = shot_entry(shot_id) |
prediction, _ = reference_forward(index) |
rms = float(np.sqrt(np.mean((prediction - measured[index]) ** 2))) |
ratio = rms / float(np.mean(NOISE)) |
assert FORWARD_RMS_RATIO[0] <= ratio <= FORWARD_RMS_RATIO[1], ( |
f"{shot_id}: sensor residual/noise ratio {ratio:.3f} is outside " |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.