We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be55f2e commit 80be865Copy full SHA for 80be865
1 file changed
HOMER.py
@@ -435,7 +435,7 @@ def HOMER(cfile):
435
bounds_error=False, fill_value=0)
436
# Interpolate and normalize
437
tranfilt = finterp(xwn)
438
- tranfilt = tranfilt / np.trapz(tranfilt, xwn)
+ tranfilt = tranfilt / np.abs(np.trapz(tranfilt, xwn))
439
meanwn.append(np.sum(xwn*tranfilt)/sum(tranfilt))
440
# Find non-zero indices for faster integration
441
nonzero = np.where(tranfilt!=0)
0 commit comments