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

Improve tutorials #102

Merged
merged 4 commits into from
Aug 23, 2024
Merged

Improve tutorials #102

merged 4 commits into from
Aug 23, 2024

Conversation

cgohlke
Copy link
Member

@cgohlke cgohlke commented Aug 21, 2024

Description

This PR proposes the following improvements to the tutorials:

  • Move tutorials focused on using specific modules, classes, and functions into a "Programming interface" section.
  • Create an "Applications" section for future problem-oriented how-to guides for advanced applications.
  • Expand the introduction tutorial:
    • State that "using the PhasorPy library requires familiarity with the phasor approach, image processing, array programming, and Python."
    • Specify C compilers required to install PhasorPy from source.
    • Define "phasor coordinates".
    • Make aware of undefined/NaN values.
    • Show that signals can be reconstructed from all harmonics.
    • Add reason why calibration is necessary.
    • Show that calibration can be undone.
    • Plot more intermediate results for calibration and filtering.
    • Add conversion to apparent single lifetimes.
    • Add section about spectral phasors.

TODO:

  • Add helper function for plotting images to reduce matplotlib code in tutorials.
  • Replace FLUTe dataset with PTU files.

Release note

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

Improve tutorials

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 added the documentation Improvements or additions to documentation label Aug 21, 2024
@cgohlke cgohlke self-assigned this Aug 21, 2024
@cgohlke
Copy link
Member Author

cgohlke commented Aug 21, 2024

Hi @bruno-pannunzio : although I labelled this work in progress, I would appreciate your review. Specifically, is this level of detail appropriate for an introductory tutorial? Also, I think it is about time to replace the TIFF dataset from FLUTe with our own data before the first release of the library. Preferably in form of PTU files to demonstrate the phasorpy.io module and metadata handling.

@bruno-pannunzio
Copy link
Contributor

Hi @cgohlke! I really like the suggested changes to the tutorials! It makes it much more clear and more direct to select one depending on the needs. Also the addition of the "Applications" sections is great, this can be useful to show the full functionalities of the library without crowding the API tutorials. I think we can work after in useful tutorials for the Applications section.

Regarding the introduction tutorial, I think all are excellent additions.

is this level of detail appropriate for an introductory tutorial

I believe that in general it's okay the level of detail. I would suggest just moving the apparent lifetime section to another tutorial (maybe to an application tutorial?). I think the introduction tutorial is enough if we show the most basic workflow which I think is reached when plotting. I think further analyses can be discussed in more detail in other tutorials. Also, the introduction tutorial is missing hyperspectral images, which would be good to show since it's also an important aspect of the library, and at the moment the introduction tutorial is biased towards FLIM. Maybe we can use the paramecium example used in the cursors tutorial and show the basic workflow until plotting, which shouldn't extend too much the tutorial.

Also, I think it is about time to replace the TIFF dataset from FLUTe with our own data before the first release of the library. Preferably in form of PTU files to demonstrate the phasorpy.io module and metadata handling.

Definitely! This is long due. The problem we have with this is that our instruments only generate FBD files. We should consider reaching someone open to provide us some nice PTU files. Maybe @lmalacrida can help with this.

@cgohlke
Copy link
Member Author

cgohlke commented Aug 21, 2024

Thanks for the review!

I think we can work after in useful tutorials for the Applications section.

I'd like to add (not in this PR) a tutorial demonstrating out-of-core processing with dask on one of the tiled datasets that @schutyb recently shared. Let's discuss in the next meeting.

I would suggest just moving the apparent lifetime section to another tutorial (maybe to an application tutorial?). I think the introduction tutorial is enough if we show the most basic workflow which I think is reached when plotting.

I agree, that section stands out. On the other hand, I wanted the introduction tutorial to demonstrate all aspects of the library, which includes converting phasor coordinates, and (currently still missing) cursors and components.

Also, the introduction tutorial is missing hyperspectral images, which would be good to show since it's also an important aspect of the library, and at the moment the introduction tutorial is biased towards FLIM.

True. On the other hand, of the almost 60 functions and classes in the library so far, more than half are specific to FLIM, while only two (?) functions are specific to spectral imaging.

Let's dedicate one section at the end of the introduction tutorial to "Spectral phasors", basically a shortened version of the cursors tutorial. OK?

The problem we have with this is that our instruments only generate FBD files.

FDB is certainly more appropriate than TIFF for the tutorial, but FBD is such a mess of a format that I prefer to not cover it in the main tutorial.

@bruno-pannunzio
Copy link
Contributor

Let's dedicate one section at the end of the introduction tutorial to "Spectral phasors", basically a shortened version of the cursors tutorial. OK?

Great!

FDB is certainly more appropriate than TIFF for the tutorial, but FBD is such a mess of a format that I prefer to not cover it in the main tutorial.

Agree. PTU is more adequate for the tutorial. Let's discuss next meeting candidates to let us use some of their files.

@cgohlke cgohlke changed the title WIP: Improve tutorials Improve tutorials Aug 23, 2024
@cgohlke
Copy link
Member Author

cgohlke commented Aug 23, 2024

I added the section about spectral phasors and removed apparent lifetimes. In principle, this is ready for review and could be merged. Switching to PTU files and adding a tutorial about apparent lifetimes (which would require a helper function for plotting images) is better done in separate PRs.

@bruno-pannunzio bruno-pannunzio self-requested a review August 23, 2024 11:57
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 think now the introduction tutorial is great. I can work in a separate PR in the sections that were left to do (cursors and components) if you want, so that this can be merged and available.

@cgohlke cgohlke merged commit ce70d00 into phasorpy:main Aug 23, 2024
16 checks passed
@cgohlke cgohlke deleted the tutorials branch August 23, 2024 14:11
schutyb pushed a commit to schutyb/phasorpy that referenced this pull request Aug 30, 2024
schutyb pushed a commit to schutyb/phasorpy that referenced this pull request Aug 30, 2024
schutyb pushed a commit to schutyb/phasorpy that referenced this pull request Aug 30, 2024
schutyb pushed a commit to schutyb/phasorpy that referenced this pull request Aug 30, 2024
schutyb pushed a commit to schutyb/phasorpy that referenced this pull request Aug 30, 2024
schutyb pushed a commit to schutyb/phasorpy that referenced this pull request Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants