|
37 | 37 | from imap_l3_processing.glows.l3e.glows_l3e_initializer import GlowsL3EInitializerOutput |
38 | 38 | from imap_l3_processing.glows.l3e.glows_l3e_lo_model import GlowsL3ELoData |
39 | 39 | from imap_l3_processing.glows.l3e.glows_l3e_ultra_model import GlowsL3EUltraData |
40 | | -from imap_l3_processing.glows.l3e.glows_l3e_utils import GlowsL3eRepointings |
| 40 | +from imap_l3_processing.glows.l3e.glows_l3e_utils import GlowsL3eRepointings, LoPivotAngle |
41 | 41 | from imap_l3_processing.models import InputMetadata |
42 | 42 | from imap_l3_processing.utils import save_data |
43 | 43 | from tests.test_helpers import get_test_instrument_team_data_path, get_test_data_path, get_test_data_folder, \ |
@@ -1045,7 +1045,7 @@ def test_process_l3e(self, mock_process_ultra, mock_process_ultra_hf, mock_proce |
1045 | 1045 | mock_process_lo.return_value = [Path('path/to/lo_l3e')] |
1046 | 1046 | mock_process_ultra.return_value = [Path('path/to/ultra_l3e')] |
1047 | 1047 | mock_process_ultra_hf.return_value = [Path('path/to/ultra_l3e_hf')] |
1048 | | - mock_get_lo_pivot_angles.return_value = {25: 75} |
| 1048 | + mock_get_lo_pivot_angles.return_value = {25: LoPivotAngle("l1b_nhk.cdf",75)} |
1049 | 1049 |
|
1050 | 1050 | expected_l3e_products = [ |
1051 | 1051 | Path('path/to/lo_l3e'), |
@@ -1083,7 +1083,7 @@ def test_process_l3e(self, mock_process_ultra, mock_process_ultra_hf, mock_proce |
1083 | 1083 | call(["hi_ancillary.dat"], 25, start_epoch, epoch_delta, 90, 1), |
1084 | 1084 | call(["hi_ancillary.dat"], 25, start_epoch, epoch_delta, 135, 2) |
1085 | 1085 | ]) |
1086 | | - mock_process_lo.assert_called_once_with(["lo_ancillary.dat"], 25, start_epoch, epoch_delta, 75, |
| 1086 | + mock_process_lo.assert_called_once_with(["lo_ancillary.dat", "l1b_nhk.cdf"], 25, start_epoch, epoch_delta, 75, |
1087 | 1087 | 3) |
1088 | 1088 | mock_process_ultra.assert_called_once_with(["ul_ancillary.dat"], 25, start_epoch, epoch_delta, 4) |
1089 | 1089 | mock_process_ultra_hf.assert_called_once_with(["ul_ancillary.dat"], 25, start_epoch, epoch_delta, 4) |
@@ -1433,10 +1433,10 @@ def test_process_l3e_skips_repointing_on_exception(self, mock_process_ultra, moc |
1433 | 1433 | ValueError("Failed to generate ultra!") |
1434 | 1434 | ] |
1435 | 1435 | mock_get_lo_pivot_angles.return_value = { |
1436 | | - 24: 124, |
1437 | | - 25: 125, |
1438 | | - 26: 126, |
1439 | | - 27: 127, |
| 1436 | + 24: LoPivotAngle(parent_filename="l1b_nhk_24", pivot_angle=124), |
| 1437 | + 25: LoPivotAngle(parent_filename="l1b_nhk_25", pivot_angle=125), |
| 1438 | + 26: LoPivotAngle(parent_filename="l1b_nhk_26", pivot_angle=126), |
| 1439 | + 27: LoPivotAngle(parent_filename=None, pivot_angle=90), |
1440 | 1440 | } |
1441 | 1441 |
|
1442 | 1442 | expected_l3e_products = [ |
@@ -1516,10 +1516,10 @@ def test_process_l3e_skips_repointing_on_exception(self, mock_process_ultra, moc |
1516 | 1516 | call(hi_parents, 27, start_epoch_4, epoch_delta_4, 135, 2) |
1517 | 1517 | ]) |
1518 | 1518 | mock_process_lo.assert_has_calls([ |
1519 | | - call(lo_parents, 24, start_epoch_1, epoch_delta_1, 124, 3), |
1520 | | - call(lo_parents, 25, start_epoch_2, epoch_delta_2, 125, 3), |
1521 | | - call(lo_parents, 26, start_epoch_3, epoch_delta_3, 126, 3), |
1522 | | - call(lo_parents, 27, start_epoch_4, epoch_delta_4, 127, 3), |
| 1519 | + call(lo_parents + ["l1b_nhk_24"], 24, start_epoch_1, epoch_delta_1, 124, 3), |
| 1520 | + call(lo_parents + ["l1b_nhk_25"], 25, start_epoch_2, epoch_delta_2, 125, 3), |
| 1521 | + call(lo_parents + ["l1b_nhk_26"], 26, start_epoch_3, epoch_delta_3, 126, 3), |
| 1522 | + call(lo_parents, 27, start_epoch_4, epoch_delta_4, 90, 3), |
1523 | 1523 | ]) |
1524 | 1524 |
|
1525 | 1525 | mock_process_ultra.assert_has_calls([ |
|
0 commit comments