Skip to content

Commit 7d6b7be

Browse files
authored
1 parent 27710f2 commit 7d6b7be

2 files changed

Lines changed: 15 additions & 13 deletions

File tree

imap_processing/lo/l1c/lo_l1c.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def create_pset_counts(
302302
# Create the histogram with 3600 longitude bins, 40 latitude bins, and 7 energy bins
303303
lon_edges = np.arange(3601)
304304
lat_edges = np.arange(41)
305-
energy_edges = np.arange(8)
305+
energy_edges = np.arange(1, 9)
306306

307307
hist, _edges = np.histogramdd(
308308
data,

imap_processing/tests/lo/test_lo_l1c.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,35 +124,36 @@ def counts():
124124
return np.zeros(PSET_SHAPE)
125125

126126

127+
# ESA Indices are ESA step - 1
127128
@pytest.fixture
128129
def h_counts(counts):
129130
h = counts.copy()
130-
h[0, 1, 20, 20] = 2
131-
h[0, 4, 2000, 20] = 1
131+
h[0, 0, 20, 20] = 2
132+
h[0, 3, 2000, 20] = 1
132133
return h
133134

134135

135136
@pytest.fixture
136137
def o_counts(counts):
137138
o = counts.copy()
138-
o[0, 5, 3500, 20] = 1
139-
o[0, 2, 0, 20] = 1
139+
o[0, 4, 3500, 20] = 1
140+
o[0, 1, 0, 20] = 1
140141
return o
141142

142143

143144
@pytest.fixture
144145
def triples_counts(counts):
145146
triples = counts.copy()
146-
triples[0, 1, 20, 20] = 2
147-
triples[0, 2, 0, 20] = 1
147+
triples[0, 0, 20, 20] = 2
148+
triples[0, 1, 0, 20] = 1
148149
return triples
149150

150151

151152
@pytest.fixture
152153
def doubles_counts(counts):
153154
doubles = counts.copy()
154-
doubles[0, 4, 2000, 20] = 1
155-
doubles[0, 5, 3500, 20] = 1
155+
doubles[0, 3, 2000, 20] = 1
156+
doubles[0, 4, 3500, 20] = 1
156157
return doubles
157158

158159

@@ -256,10 +257,11 @@ def test_filter_goodtimes(l1b_de, anc_dependencies):
256257
def test_create_pset_counts(l1b_de):
257258
# Arrange
258259
expected_counts = np.zeros((1, 7, 3600, 40))
259-
expected_counts[0, 1, 20, 20] = 2
260-
expected_counts[0, 4, 2000, 20] = 1
261-
expected_counts[0, 5, 3500, 20] = 1
262-
expected_counts[0, 2, 0, 20] = 1
260+
# ESA Indices are ESA step - 1
261+
expected_counts[0, 0, 20, 20] = 2
262+
expected_counts[0, 3, 2000, 20] = 1
263+
expected_counts[0, 4, 3500, 20] = 1
264+
expected_counts[0, 1, 0, 20] = 1
263265

264266
# Act
265267
counts = create_pset_counts(l1b_de)

0 commit comments

Comments
 (0)