MannLabs / py-lmd

https://mannlabs.github.io/py-lmd/
MIT License
7 stars 1 forks source link

Speed improvements when writing XML containing multiple wells #11

Open sophiamaedler opened 1 month ago

sophiamaedler commented 1 month ago

when trying to generate an XML whereN cells are sorted into Z wells the coordinate locations for each cell were recalculated for each well. This PR implements improvements to the workflow that only calculates required values once and reloads them when required. This provides a significant speed improvement when generating XMLs where Z is high.

In addition multithreading has been implemented to allow for the parallel calculation of XML coordinates for multiple cell sets. This can be set by providing an additional parameter (threads) to the segmentation loader. Per default this parameter is set to 1 to disable multi-threading.