I-ALiRT - SWAPI Quick Fix for LUT#2503
I-ALiRT - SWAPI Quick Fix for LUT#2503laspsandoval merged 12 commits intoIMAP-Science-Operations-Center:devfrom
Conversation
imap_processing/tests/ialirt/data/l0/imap_swapi_esa-unit-conversion_20251201_v001.csv
Outdated
Show resolved
Hide resolved
imap_processing/tests/ialirt/data/l0/iois_1_packets_2025_343_00_00_17
Outdated
Show resolved
Hide resolved
imap_processing/tests/ialirt/data/l0/iois_1_packets_2025_343_00_00_17
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
I still think this can be removed and tested with the utilities from the main repository can't it?
#2503 (comment)
Bring in the esa_unit_conversion_table fixture and change sweep#2 to 3 and then you verify that your lookup on 3 is valid without adding a new file and needing to update it for 4 and 5 which SWAPI is now at as well.
def test_solve_full_sweep_energy_id3(esa_unit_conversion_table, lut_notes_table):
"""Test the solve_full_sweep_energy function for sweep id 3 case"""
# Modify the current conversion table we have to have entries for sweep id 3
esa_unit_conversion_table = esa_unit_conversion_table.copy(deep=True)
esa_unit_conversion_table.loc[
esa_unit_conversion_table["Sweep #"] == 2, "Sweep #"
] = 3
There was a problem hiding this comment.
I can do it with everything except
def test_optimize_parameters():
The energy values are different. To change this one I would need to request new validation values from the instrument team.
greglucas
left a comment
There was a problem hiding this comment.
OK, this looks good now, just one minor suggestion if it works. Thank you, Laura!
| @pytest.fixture(scope="session") | ||
| def esa_unit_conversion_table() -> pd.DataFrame: |
There was a problem hiding this comment.
I think you might be able to import the fixture from the other test module so you don't have to duplicate it here.
from imap_processing.tests.swapi...
6a8578e
into
IMAP-Science-Operations-Center:dev
Change Summary
Overview
This is to accommodate the new lut.
Updated Files
Testing