-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add helper methods for timeseries support #56
Add helper methods for timeseries support #56
Conversation
This adds in helper functions to detect equilibration in timeseries data, as well as trimming away the timeseries data that is not equilibrated. Unit tests are included to verify behavior.
@chrisjonesBSU can you take a look at this and see if we can leverage utilities like these in your PR? This should provide a defined method we can all use in the study to then sample data without much code duplication for different properties. |
project/src/analysis/equlibration.py
Outdated
discarding more data. | ||
|
||
""" | ||
if not is_equilibrated(a_t, threshold=threshold, nskip=nskip): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When calling the is_equilibrated
function, if it's True, could it also return t0
and g
? That way we don't have to run timeseries.detectEquilibration
a second time in trim_non_equilibrated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven’t tried that in python, but would that be an issue for the false case?
Or I guess we can just return None for those values. Does None
for the non-existent t0 and g seem reasonable in the false case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, None
seems reasonable-- in this case we would use it something like this?
eq, t0, g = is_equilibrated
if eq:
do something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok cool. I just pushed those changes!
Co-authored-by: Jenny <39961845+jennyfothergill@users.noreply.github.com>
This adds in helper functions to detect equilibration in timeseries
data, as well as trimming away the timeseries data that is not
equilibrated.
Unit tests are included to verify behavior.