Pull request from ElevenTX
Hi Ross,
As we discussed, this is a big pull request with many modifications and revisions we made to the code. Please let me know what you think!
Best,
Omer
Caching of logicle transform has been added to transform module of v3.0. I've adapted your code to make it scale to multiple dimensions (the transforms in the matplotlib transformer handle either 1 or 2). This means all logicle transforms across the whole library now benefit from caching.
I've also adapted it so that caching can handle different kwargs passed to the Transformer so for example if you perform a logicle transform with m=4.5 but then later change this to m=4.0, the cached results for these two calculations are kept separate from each other.
Finally, the cached results can be saved to disk between sessions using the save_cache function which takes advantage of the configurations tool coming with version 3.0. (the next release has been bumped from a minor to a major due to the large changes planned).
Updated code can be found here: https://github.com/burtonrj/CytoPy/blob/v3.0/cytopy/flow/transform.py Tests: https://github.com/burtonrj/CytoPy/blob/v3.0/cytopy/tests/transform_test.py
Caching of logicle transform has been added to transform module of v3.0. I've adapted your code to make it scale to multiple dimensions (the transforms in the matplotlib transformer handle either 1 or 2). This means all logicle transforms across the whole library now benefit from caching.
I've also adapted it so that caching can handle different kwargs passed to the Transformer so for example if you perform a logicle transform with m=4.5 but then later change this to m=4.0, the cached results for these two calculations are kept separate from each other.
Finally, the cached results can be saved to disk between sessions using the
save_cachefunction which takes advantage of the configurations tool coming with version 3.0. (the next release has been bumped from a minor to a major due to the large changes planned).Updated code can be found here: https://github.com/burtonrj/CytoPy/blob/v3.0/cytopy/flow/transform.py Tests: https://github.com/burtonrj/CytoPy/blob/v3.0/cytopy/tests/transform_test.py
I've actually dramatically simplified this with lru_cache now