Skip to content

Add a function to display all segmented particles in one frame#25

Open
YichiWang wants to merge 28 commits into
TomSlater:masterfrom
YichiWang:master
Open

Add a function to display all segmented particles in one frame#25
YichiWang wants to merge 28 commits into
TomSlater:masterfrom
YichiWang:master

Conversation

@YichiWang
Copy link
Copy Markdown

e.g.
particles = ps.ParticleAnalysis(image, params)
particles.show()

YichiWang added 4 commits July 3, 2020 16:36
test if local change can be commit to remote github
This reverts commit 6ec6344.
Set default store_im to ture to store segmented particles after call ps.ParticleAnalysis
eg. particles.show(). The displayed particles were normalize_boxing. Next step should enable option to display all particle images without normalize_boxing
Comment thread ParticleSpy/ParticleAnalysis.py Outdated
@TomSlater
Copy link
Copy Markdown
Owner

Thanks Yichi, nice addition.

The PR should go to ePSIC-DLS/ParticleSpy rather than here.

I can add some documentation / tests too, unless you want to give it a go.

YichiWang added 5 commits July 8, 2020 14:37
This reverts commit 67ddc5b.
Allow segmented particle images output as a list of 2D numpy arrays (without hyperspy metadata).

e.g.
particles = ps.ParticleAnalysis(image, params)
particles.normalize_boxing()
pim_ls = particles.show(output=True)
@YichiWang
Copy link
Copy Markdown
Author

Thanks Yichi, nice addition.

The PR should go to ePSIC-DLS/ParticleSpy rather than here.

I can add some documentation / tests too, unless you want to give it a go.

Hi Tom, perhaps you could add documentation / tests for this one to show me how it looks like so I can follow in the future. Thanks

YichiWang added 18 commits July 9, 2020 14:39
This reverts commit ed2a093.
This reverts commit 1924709.
e.g.
particle_list.show('mask')
or particle_list.show('Image')
Allow show segmented particles in a montage with adjustable number of columns.

e.g. particle_list.show(cols=1). Default montage try to display all particles into a square arrangement.
Plus correct particle only image 'p_im'
…lculating image intensity

default is True, i.e. perform background subtraction
Default is perform background subtraction for intensity calculation and for stored particle image.
With particle.store['pad']=None and particle.store['store_im']=True, the saved particle image is masked from original survey image and have save dimension as survey image and saved mask.
Main: Use np.ma.masked_array to mask particle image, so intensity std do not calculate the background area.

Others: 1. all intensity are background subtracted intensity. 2. Background value are saved as property.
Few more functions. This is a standalone script and not merged with ParticleSpy yet.

-find boundary pixel in a clock-wise seqeunce
-calculate boundary curvature (signed) use least squre circle fit.
-average boundary curvature by given angle interval so at same direction boundary curvatures of two particle with different size (i.e. different boundary pixels) are comparable.

Normalised boundary curvature by particle's equivalent diameter is not implemented yet.
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.

2 participants