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 plot module #36

Merged
merged 11 commits into from
Mar 5, 2024
Merged

Add plot module #36

merged 11 commits into from
Mar 5, 2024

Conversation

cgohlke
Copy link
Member

@cgohlke cgohlke commented Feb 25, 2024

Description

This PR adds a plot module with functions and classes to create publication quality visualizations of phasor coordinates and related data using the matplotlib library.

The following tutorials are added or updated:

  • Phasor plot: An introduction to the PhasorPlot class.
  • Phasor coordinates from lifetimes: An introduction to the phasor_from_lifetime function.
  • Introduction to PhasorPy: An introduction to using the PhasorPy library.

The introduction tutorial depends on scikit-image for median filter.

Release note

Summarize the changes in the code block below to be included in the
release notes:

Add plot module

Checklist

  • The pull request title, summary, and description are concise.
  • Related issues are linked in the description.
  • New dependencies are explained.
  • The source code and documentation can be distributed under the MIT license.
  • The source code adheres to code standards.
  • New classes, functions, and features are thoroughly tested.
  • New, user-facing classes, functions, and features are documented.
  • New features are covered in tutorials.
  • No files other than source code, documentation, and project settings are added to the repository.

@cgohlke cgohlke self-assigned this Feb 25, 2024
@cgohlke cgohlke added the enhancement New feature or request label Feb 25, 2024
@cgohlke cgohlke changed the title WIP: Add plot module Add plot module Mar 3, 2024
@cgohlke
Copy link
Member Author

cgohlke commented Mar 3, 2024

This PR is ready for review.

Since the discussion last week, I improved the universal semicircle, added convenience functions for plotting signal and phasor images, and finished documentations and tests.

The contour and imshow methods are not implemented yet. This PR is already large enough.

It would be nice to merge #37 before this so the introduction tutorial can use the higher level phasor_calibrate function.

Copy link
Contributor

@bruno-pannunzio bruno-pannunzio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cgohlke. I was thinking that it will take some days until I can finish all tests for #37. Maybe we can merge this PR if it is ready, which I think it is, and then I can modify the introduction tutorial to use the higher level function instead. What do you think?

@cgohlke
Copy link
Member Author

cgohlke commented Mar 5, 2024

Maybe we can merge this PR if it is ready

Sure. You can update the tutorial in #37 after this is merged, or it can be updated later.

@schutyb
Copy link
Contributor

schutyb commented Mar 5, 2024

I tried the full circle for spectral it and for me its OK, just a little thing in the test_plot.py file the class TestPhasoPlot: should not be TestPhasorPlot: with an r

"""Test the PhasorPlot class."""

tests/test_plot.py Outdated Show resolved Hide resolved
@schutyb schutyb self-requested a review March 5, 2024 17:06
@cgohlke
Copy link
Member Author

cgohlke commented Mar 5, 2024

Thanks @bruno-pannunzio and @schutyb. I pushed some minor fixes and will merge this PR.

@cgohlke cgohlke merged commit 18c2a36 into phasorpy:main Mar 5, 2024
13 checks passed
@cgohlke
Copy link
Member Author

cgohlke commented Mar 5, 2024

The updated tutorials are now online @ https://www.phasorpy.org/stable/tutorials/

@cgohlke cgohlke deleted the plot branch March 5, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants