Skip to content

Commit

Permalink
implementing #70 and adjusting test data
Browse files Browse the repository at this point in the history
  • Loading branch information
joefutrelle committed Sep 7, 2022
1 parent e42ec1f commit 673e897
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ifcb/metrics/ml_analyzed.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def compute_ml_analyzed_s2(abin):
TOLERANCE = 0.05
ml_analyzed_hdr, look_time_hdr, run_time_hdr = compute_ml_analyzed_s2_hdr(abin)
ml_analyzed_adc, look_time_adc, run_time_adc = compute_ml_analyzed_s2_adc(abin)
if abs(ml_analyzed_adc - ml_analyzed_hdr) < TOLERANCE:
if look_time_hdr > 0 and abs(ml_analyzed_adc - ml_analyzed_hdr) < TOLERANCE:
return ml_analyzed_hdr, look_time_hdr, run_time_hdr
else:
return ml_analyzed_adc, look_time_adc, run_time_adc
Expand Down
10 changes: 5 additions & 5 deletions ifcb/tests/metrics/test_bin_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
HUMIDITY: 32.167437512207,
},
'D20130526T095207_IFCB013': {
'ml_analyzed': 5.0808411708,
'run_time': 1231.024861,
'look_time': 1219.401881,
'inhibit_time': 11.62298,
'trigger_rate': 0.09585509093954846,
'ml_analyzed': 4.8850699041666665,
'run_time': 1184.037103,
'look_time': 1172.416777,
'inhibit_time': 11.620325999999977,
'trigger_rate': 0.09965903914752577,
TEMPERATURE: 35.270397,
HUMIDITY: 2.48685,
}
Expand Down
2 changes: 1 addition & 1 deletion ifcb/tests/metrics/test_ml_analyzed.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

TARGET_ML_ANALYZED = {
'IFCB5_2012_028_081515': (0.003391470833333334, 0.8139530000000001, 1.251953),
'D20130526T095207_IFCB013': (5.080841170833334, 1219.401881, 1231.024861)
'D20130526T095207_IFCB013': (4.8850699041666665, 1172.416777, 1184.037103)
}

class TestMlAnalyzed(unittest.TestCase):
Expand Down

0 comments on commit 673e897

Please sign in to comment.