Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions imap_processing/lo/l1b/lo_l1b.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,7 @@ def get_spin_start_times(
spin_start_times = interpolate_spin_data(l1a_de["shcoarse"].values)[
"spin_start_met"
].values
spin_start_times = np.repeat(spin_start_times, l1a_de["de_count"].values)

return spin_start_times

Expand Down
7 changes: 3 additions & 4 deletions imap_processing/tests/lo/test_lo_l1b.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,9 @@ def test_lo_l1b_de(
# Arrange
# Mock the spin data to provide spin start times
# Create a DataFrame covering the time range of the test data
num_events = 2000
mock_spin_df = pd.DataFrame(
{
"spin_start_met": np.ones(num_events),
"spin_start_met": np.ones([1]),
}
)
mock_interpolate_spin_data.return_value = mock_spin_df
Expand Down Expand Up @@ -508,7 +507,7 @@ def test_get_spin_start_times(mock_interpolate_spin_data):
# Mock the spin data to return specific spin start times
mock_spin_df = pd.DataFrame(
{
"spin_start_met": [10.5, 10.5, 30.1, 30.1, 30.1],
"spin_start_met": [10.5, 30.1],
}
)
mock_interpolate_spin_data.return_value = mock_spin_df
Expand Down Expand Up @@ -546,7 +545,7 @@ def test_set_event_met(mock_interpolate_spin_data):
# Mock the spin data
mock_spin_df = pd.DataFrame(
{
"spin_start_met": [10, 10, 30, 30, 30],
"spin_start_met": [10, 30],
}
)
mock_interpolate_spin_data.return_value = mock_spin_df
Expand Down