Skip to content

Commit

Permalink
Fix sd() to divide by dimensionality
Browse files Browse the repository at this point in the history
  • Loading branch information
xhgchen committed Jul 12, 2023
1 parent fde9cbf commit b7e2dd3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions transport_analysis/velocityautocorr.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,10 @@ def sd(self, start=0, stop=0, step=1):
"""
stop = self.n_frames if stop == 0 else stop

return integrate.trapezoid(
self.results.timeseries[start:stop:step],
self.times[start:stop:step],
return (
integrate.trapezoid(
self.results.timeseries[start:stop:step],
self.times[start:stop:step],
)
/ self.dim_fac
)

0 comments on commit b7e2dd3

Please sign in to comment.