Skip to content

Mg/features plot - #404

Merged
giovannivolpe merged 8 commits into
developfrom
mg/features_plot
Sep 8, 2025
Merged

giovannivolpe merged 8 commits into
developfrom
mg/features_plot

Conversation

@mirjagranfors

Copy link
Copy Markdown
Collaborator

Updated the docs of feature/plot() and added examples

@mirjagranfors
mirjagranfors requested review from JChonpca and Pwhsky July 30, 2025 08:27
Comment thread deeptrack/features.py
>>> import torch
>>> img = torch.randint(0, 256, size=(64, 64))
>>> feature.plot(img, cmap='gray');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A more advanced example of the usage that I think should be included would be to plot a sphere resolved in brightfield, something like:

>>> particle = dt.Sphere()
>>> optics = dt.Brightfield()
>>> imaged_particle = optics(particle)
>>> imaged_particle.plot()

@mirjagranfors

Copy link
Copy Markdown
Collaborator Author

Do we have to check the device before plotting? I don't think that the plotting will work for cuda-tensors

@giovannivolpe
giovannivolpe merged commit 8981c62 into develop Sep 8, 2025
25 checks passed
@giovannivolpe
giovannivolpe deleted the mg/features_plot branch September 8, 2025 09:05
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.

4 participants