AFM-SPM / TopoStats

An AFM image analysis program to batch process data and obtain statistics from images
https://afm-spm.github.io/TopoStats/
GNU Lesser General Public License v3.0
56 stars 10 forks source link

Further Modularisation #601

Open SylviaWhittle opened 1 year ago

SylviaWhittle commented 1 year ago

Is your feature request related to a problem? Please describe. TopoStats has been made more modular with the merging of recent PRs #540 and #600 (thanks @ns-rse). It would be good to have further work enabling the independent function of the different steps.

This could enable easier feature additions and perhaps easier testing procedures. It would also enable people to use TopoStats in a more custom manner, and eliminate unnecessary re-processing that has been a large obstacle for several users with large datasets. For example, skipping flattening and loading pre-processed images along with their pixel_to_nanometre scaling factor.

I'll update this as I explore possible implementations for this. The issue is rather complicated with the amount of overhead that we do in the background (eg: checking if config is valid, updating plotting dictionary, and passing optionally plotted images around).

ns-rse commented 1 year ago

Definitely agree with this, if we can make it so each step can be run in isolation it will give users greater flexibility and that was the thinking behind #517 which #540 sets the framework in place to extend.

Some random thoughts...

Configuration Files

Intermediary Files

Arguments

Output

derollins commented 1 year ago

From a heavy user perspective this would be very useful. For a complex dataset I usually have to iterate the analysis at each step (processing, image plotting, masking etc.) and can have different parameters for each part for each part of the analysis. This currently can be very time consuming especially when I sometimes need to use the 'all' image set and also topostats is filling up my laptop storage very quickly since I currently just change the name of the output file for each run I want to compare so get everything multiple times.

It would be great if once the raw data had been flattened I could simply use that flattened data to make new images (different scales, colours, formats etc.) and optimise masking from the flattened image rather than having to completely reprocess everything.

ns-rse commented 12 months ago

Feels like we're well on the way to achieving this with the refactoring @SylviaWhittle undertook which was merged in #613.

What more needs doing to round this out? Is it better documentation, tutorials on how to use the new command line interface (CLI), are we missing modules for anything, perhaps tracing/skeletonisation aspects which are blocked by the refactoring that is a work in (slow) progress.