ePSIC-DLS / particlespy

Package for analysing particles in electron microscopy data sets.
GNU General Public License v3.0
20 stars 10 forks source link

Should additional functionality be added as plugins to ParticleAnalysis? #34

Open TomSlater opened 4 years ago

TomSlater commented 4 years ago

Currently (as of v0.3.0), it is possible to add properties to particles after running ParticleAnalysis through the construction of a function that operates on individual particles. This assumes that the required data has been "stored" with the particle.

If ParticleSpy is to expand to include lots of different types of analysis it would seem sensible to be able to run different analyses at ParticleAnalysis run time. In order to do this, it may be possible for a user to pre-define a function to plug in to ParticleAnalysis.

I should take a look at how a plug-in system might work to add arbitrary functions when analysis is run. This would also allow streamlining of the current ParticleAnalysis function.

TomSlater commented 4 years ago

The simplest method for this would be to pass a list of functions to ParticleAnalysis for it to run.

For common functions there could be an analysis_library.py that was imported and functions could be passed from this.