Skip to content

Commit

Permalink
Merge pull request #76 from joefutrelle/ml_analyzed_2023
Browse files Browse the repository at this point in the history
adding missing case for inhibittime > 0.

failing checks need to be corrected, but they do not indicate a problem with this PR.
  • Loading branch information
joefutrelle authored Jan 2, 2024
2 parents db00491 + 19a6d2b commit fe9bed9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ifcb/metrics/ml_analyzed.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def compute_ml_analyzed_s2_adc(adc):
diffinh = np.diff(adc['inhibit_time'])

# find indices of rows where inhibitime is not 0 and not less than the previous value (within 0.1 second)
# iii = [0] + [i+1 for i in range(len(diffinh)) if diffinh[i] > -0.1 and diffinh[i] < 5]
iii = np.where((diffinh > -0.1) & (diffinh < 5))[0] + 1
iii = np.where((adc['inhibit_time'][1:] > 0) & (diffinh > -0.1) & (diffinh < 5))[0] + 1
iii = np.insert(iii, 0, 0)


Expand Down

0 comments on commit fe9bed9

Please sign in to comment.