-
Notifications
You must be signed in to change notification settings - Fork 709
Updated PSA module #438
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
Updated PSA module #438
Conversation
…ng, additional functions/features
Heya Add changes to CHANGELOG please |
some tests would be nice as well. |
@kain88-de I agree. I don't think this analysis module has any tests yet, but they should be added before this is merged. @sseyler, can you add a test class to |
@sseyler , you can add a second AdK DIMS trajectory to the test data, they are small. |
@kain88-de @dotsdl Most definitely. Minimal tests will be added very soon so that it can be merged; as planned, a full test suite will be added in the near future. |
list of indices representing the row-wise order of the objects | ||
after clustering | ||
from matplotlib.pyplot import figure, savefig, tight_layout, clf | ||
import seaborn as sns |
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.
You might need to put seaborn in as an optional dependency here and maybe document that it's potentially needed.
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.
Does seaborn change the matplotlib style also when imported in a module? If yes that might lead to surprises for some users.
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.
@richardjgowers Got it.
@kain88-de seaborn does change the default matplotlib style, unless one uses import seaborn.apionly
. This was what I did in the plot_annotated_heatmap
method, but not the plot_nearest_neighbors
method. I am going to change this so that plot_nearest_neighbors
behaves the same way as plot_annotated_heatmap
and doesn't catch users by surprise.
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'd recommend using seaborn.apionly
in general, since this means a user's chosen style isn't disrupted by using this method.
@kain88-de @richardjgowers I'm happy to convert to numpy-style docs in the near future. Just trying to get a working version of this module out so those who come across it in the associated paper can start tinkering. |
@sseyler just tell me when you're happy with it and I'll merge and release 0.11.1 to pypi |
@richardjgowers I will be rolling out periodic enhancements (and fixes) in the near future, but I'm happy with it as it currently stands (once I get the final Travis CI build to not fail). |
…rs properties in PSAnalysis
…rresponding instance variables (_psa_pairs, _NN, and _HP) are now removed from the API
… be performed prior) in PSAnalysis
@richardjgowers The tests appear to be failing, but neither I nor @dotsdl can figure out exactly why. It appears it might have something to do with coverage checks. |
Coverage got bumped to version 4.0 in the last few days. Probably gotta rename something in coveragerc (or install the old version in travis) e: fixed it, so stuff should/might/could/won't (delete according to optimism level) work |
Changes to the
PSA
module now reflect proposed features in the PSA paper (in review). These additions include:hausdorff_avg
andhausdorff_wavg
), one based on computing nearest neighbor pairs and distances (hausdorff_neighbors
)psa
module for computing msd (get_msd_matrix
, used by all distance functions) and the dimensions of numpy arrays of trajectories (get_coord_axes
)plot_annotated_heatmap
to generate annotated heat maps (in addition to the heat map-dendrograms)PSA
class class to perform nearest neighbors/Hausdorff pairs analysisPSA
class class to generate plots of nearest neighbors distances as a function of (normalized) frame progressPSAPair
to facilitate the storage and extraction of heterogeneously sized data generated by nearest neighbors/Hausdorff pairs analysisPSA
class