Take abs before auc test
@@ -487,12 +487,12 @@ def test_resample(collection):
transform.ToDense(coll, 'parametric gain', output='pg_dense')
pg = coll.variables['pg_dense']
old_shape = pg.values.shape
- old_auc = np.trapz(pg.values.values.squeeze(), dx=0.1)
+ old_auc = np.trapz(np.abs(pg.values.values.squeeze()), dx=0.1)
transform.Resample(coll, 'pg_dense', 1)
pg = coll.variables['pg_dense']
new_shape = pg.values.shape
# Spacing (dx) is 10* larger when downsampled fro 10hz to 1hz
- new_auc = np.trapz(pg.values.values.squeeze(), dx=1)
+ new_auc = np.trapz(np.abs(pg.values.values.squeeze()), dx=1)
# Shape from 10hz to 1hz
assert new_shape[0] == old_shape[0] / 10
