Refactoring image deconvolution classes#449
Refactoring image deconvolution classes#449hiyoneda wants to merge 38 commits intocositools:developfrom
Conversation
I will work on this in this PR. So I changed the status to the draft PR till it is finished. |
…, add helper methods
|
The structure of the deconvolution classes is modified as follows.
A new class Two helper methods are extracted to reduce duplication and improve reuse across subclasses:
A new class A bug was fixed where |
…nvolutionDataInterface
… data_interfaces, exposure_tables)
…e super() in RichardsonLucy.post_processing
…erator-specific result keys in RichardsonLucyAdvanced
Module reorganization
Accelerator framework
Parameter and logging
Documentation
|
|
@avalluvan This PR includes minor changes to |
|
Thanks @GallegoSav and @hiyoneda! I'll wait a bit to merge this until we merge the interfaces, in order to avoid possible further conflicts. @GallegoSav mentioned a possible conflict with |
|
@israelmcmc Thanks. I will work on the background estimator from now. So I can wait for the interface being merged for a while. |
|
@hiyoneda @israelmcmc is this pr ready to be merged now ? |
|
I think so, it seems that @hiyoneda already fixed the conflict with the interfaces. Does it still work for you @GallegoSav ? |
|
I fixed the conflict. If someone checks that the imaging notebook works correctly (@GallegoSav can I ask you to do that?), it is ready to be merged in my opinion. |
This PR improves code maintainability through three key refactorings:
Centralize magic numbers into constants.py
Added the new file
cosipy/image_deconvolution/constants.pyand centralized magic numbers and default valuesReduce code duplication in finalization methods
Added _save_standard_results() method in DeconvolutionAlgorithmBase because the common save logic was used in three classes (RichardsonLucySimple, RichardsonLucy, MAP_RichardsonLucy)
Improved Error Messages
Files modified: image_deconvolution.py