Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing E-scaling test #1307

Closed
wants to merge 1 commit into from
Closed
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
15 changes: 7 additions & 8 deletions lstchain/tools/tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,10 @@
order_max = []
order_max_mod = []
for idx, _ in enumerate(e_true_list):
for j in range(len(e_migra)):
if e_migra_prob[idx][j] > e_migra_prob[idx][j - 1]:
order_max.append(j)
if e_migra_prob_mod[idx][j] > e_migra_prob_mod[idx][j - 1]:
order_max_mod.append(j)

for i in range(len(order_max)):
assert order_max[i] != order_max_mod[i]
if (e_migra_prob[idx].sum() <= 0) or (e_migra_prob_mod[idx].sum() <= 0):
continue

Check warning on line 525 in lstchain/tools/tests/test_tools.py

View check run for this annotation

Codecov / codecov/patch

lstchain/tools/tests/test_tools.py#L525

Added line #L525 was not covered by tests
order_max.append(np.argmax(e_migra_prob[idx]))
order_max_mod.append(np.argmax(e_migra_prob_mod[idx]))

for a, b in zip(order_max, order_max_mod):
assert a != b