|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Functions | |
| run (tmp_path, monkeypatch) | |
| write_gross (run, entity="LC2_Cal.CH1", times=(100.0, 200.0, 300.0), values=(50.0, 51.0, 52.0)) | |
| write_sidecar (run, lines) | |
| test_offset_applies_only_after_the_tare_was_set (run) | |
| test_a_recal_line_moves_the_offset_again (run) | |
| test_a_clear_returns_the_trace_to_absolute (run) | |
| test_the_absolute_series_is_never_touched (run) | |
| test_gross_and_tared_do_not_share_a_cache_entry (run) | |
| test_no_sidecar_means_no_tared_component (run) | |
| test_a_channel_with_no_tare_gets_no_twin (run) | |
| test_a_sidecar_dropped_in_later_takes_effect_without_a_re_export (run) | |
| test_index_version_did_not_move (run) | |
| test_a_torn_final_line_does_not_lose_the_earlier_ones (run) | |
| test_a_missing_sidecar_is_empty_not_an_error (run) | |
| test_a_non_finite_offset_is_skipped (run) | |
| test_the_unit_matches_its_absolute_twin (run) | |
Load-cell tare reconstruction in the viewer.
Run: cd webviewer && .venv/bin/python -m pytest backend/test_lc_tare.py -q
Hermetic — no elodin-db and no real run. Elodin archives ABSOLUTE force forever; the tare is
display state the backend recorded beside the run, and these tests pin the replay of it.
Every case names the wrong number it prevents:
* a step applied across the whole array makes the PRE-tare part of every run read wrong;
* a missed 'recal' line makes everything after a re-fit read wrong;
* synthesising a tared twin unconditionally makes an untared run look tared;
* synthesising in build_index instead of at serve time means a run exported before its sidecar
landed never shows its tare, with the cached index quietly winning.
| backend.test_lc_tare.run | ( | tmp_path, | |
| monkeypatch ) |
A scratch run: parquet cache and ELODIN_DIR both under tmp_path.
Definition at line 28 of file test_lc_tare.py.
| backend.test_lc_tare.test_a_channel_with_no_tare_gets_no_twin | ( | run | ) |
Definition at line 129 of file test_lc_tare.py.
References write_sidecar().
| backend.test_lc_tare.test_a_clear_returns_the_trace_to_absolute | ( | run | ) |
Definition at line 83 of file test_lc_tare.py.
References write_gross(), and write_sidecar().
| backend.test_lc_tare.test_a_missing_sidecar_is_empty_not_an_error | ( | run | ) |
Definition at line 177 of file test_lc_tare.py.
| backend.test_lc_tare.test_a_non_finite_offset_is_skipped | ( | run | ) |
Definition at line 181 of file test_lc_tare.py.
References write_sidecar().
| backend.test_lc_tare.test_a_recal_line_moves_the_offset_again | ( | run | ) |
Definition at line 71 of file test_lc_tare.py.
References write_gross(), and write_sidecar().
| backend.test_lc_tare.test_a_sidecar_dropped_in_later_takes_effect_without_a_re_export | ( | run | ) |
Definition at line 143 of file test_lc_tare.py.
References write_sidecar().
| backend.test_lc_tare.test_a_torn_final_line_does_not_lose_the_earlier_ones | ( | run | ) |
Definition at line 166 of file test_lc_tare.py.
| backend.test_lc_tare.test_gross_and_tared_do_not_share_a_cache_entry | ( | run | ) |
Definition at line 103 of file test_lc_tare.py.
References write_gross(), and write_sidecar().
| backend.test_lc_tare.test_index_version_did_not_move | ( | run | ) |
Definition at line 158 of file test_lc_tare.py.
| backend.test_lc_tare.test_no_sidecar_means_no_tared_component | ( | run | ) |
Definition at line 117 of file test_lc_tare.py.
References write_gross().
| backend.test_lc_tare.test_offset_applies_only_after_the_tare_was_set | ( | run | ) |
Definition at line 58 of file test_lc_tare.py.
References write_gross(), and write_sidecar().
| backend.test_lc_tare.test_the_absolute_series_is_never_touched | ( | run | ) |
Definition at line 93 of file test_lc_tare.py.
References write_gross(), and write_sidecar().
| backend.test_lc_tare.test_the_unit_matches_its_absolute_twin | ( | run | ) |
Definition at line 188 of file test_lc_tare.py.
| backend.test_lc_tare.write_gross | ( | run, | |
| entity = "LC2_Cal.CH1", | |||
| times = (100.0, 200.0, 300.0), | |||
| values = (50.0, 51.0, 52.0) ) |
Definition at line 43 of file test_lc_tare.py.
Referenced by test_a_clear_returns_the_trace_to_absolute(), test_a_recal_line_moves_the_offset_again(), test_gross_and_tared_do_not_share_a_cache_entry(), test_no_sidecar_means_no_tared_component(), test_offset_applies_only_after_the_tare_was_set(), and test_the_absolute_series_is_never_touched().
| backend.test_lc_tare.write_sidecar | ( | run, | |
| lines ) |
Definition at line 51 of file test_lc_tare.py.
Referenced by test_a_channel_with_no_tare_gets_no_twin(), test_a_clear_returns_the_trace_to_absolute(), test_a_non_finite_offset_is_skipped(), test_a_recal_line_moves_the_offset_again(), test_a_sidecar_dropped_in_later_takes_effect_without_a_re_export(), test_gross_and_tared_do_not_share_a_cache_entry(), test_offset_applies_only_after_the_tare_was_set(), and test_the_absolute_series_is_never_touched().