Skip to content
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

Conversation

justinGilmer
Copy link
Contributor

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.

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.
@justinGilmer
Copy link
Contributor Author

@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.

@justinGilmer justinGilmer changed the title Add helper methods for timerseries support Add helper methods for timeseries support Aug 17, 2021
project/src/analysis/equlibration.py Outdated Show resolved Hide resolved
project/tests/test_equilbration.py Show resolved Hide resolved
discarding more data.

"""
if not is_equilibrated(a_t, threshold=threshold, nskip=nskip):
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Contributor Author

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!

justinGilmer and others added 2 commits August 17, 2021 17:06
Co-authored-by: Jenny <39961845+jennyfothergill@users.noreply.github.com>
@justinGilmer justinGilmer merged commit 5b65b94 into mosdef-hub:main Aug 17, 2021
@justinGilmer justinGilmer deleted the feat/analysis/equilibration_detection branch August 17, 2021 22:41
@jennyfothergill jennyfothergill mentioned this pull request Aug 23, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants