From c4de2515e2592e02a50f0922479d85b42b6246cc Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Sun, 24 Sep 2023 15:10:20 +0200 Subject: [PATCH] refactor: remove the mess of imports. --- src/simfmri/simulator/__init__.py | 44 ++++++--------------- src/simfmri/simulator/handlers/__init__.py | 45 ++-------------------- 2 files changed, 15 insertions(+), 74 deletions(-) diff --git a/src/simfmri/simulator/__init__.py b/src/simfmri/simulator/__init__.py index d05d088..377a33f 100644 --- a/src/simfmri/simulator/__init__.py +++ b/src/simfmri/simulator/__init__.py @@ -4,44 +4,22 @@ """ from .simulation import SimDataType, SimulationParams, SimulationData from .handlers import ( + AVAILABLE_HANDLERS, H, - AcquisitionHandler, - ActivationHandler, - BigPhantomGeneratorHandler, - BrainwebPhantomHandler, - GaussianNoiseHandler, - KspaceNoiseHandler, - NoiseHandler, - RadialAcquisitionHandler, - RicianNoiseHandler, - RoiDefinerHandler, - SheppLoganGeneratorHandler, - SlicerHandler, - TextureAdderHandler, - VDSAcquisitionHandler, - StackedSpiralAcquisitionHandler, + handler, + get_handler, + list_handlers, + AbstractHandler, ) __all__ = [ - "H", - "AcquisitionHandler", - "ActivationHandler", - "BigPhantomGeneratorHandler", - "BrainwebPhantomHandler", - "GaussianNoiseHandler", - "KspaceNoiseHandler", - "NoiseHandler", - "RadialAcquisitionHandler", - "RicianNoiseHandler", - "RoiDefinerHandler", - "SheppLoganGeneratorHandler", "SimulationData", "SimDataType", "SimulationParams", - "SlicerHandler", - "TextureAdderHandler", - "VDSAcquisitionHandler", - "StackedSpiralAcquisitionHandler", - # handlers - # simulation + "AVAILABLE_HANDLERS", + "H", + "handler", + "get_handler", + "list_handlers", + "AbstractHandler", ] diff --git a/src/simfmri/simulator/handlers/__init__.py b/src/simfmri/simulator/handlers/__init__.py index 1489734..392d3f9 100644 --- a/src/simfmri/simulator/handlers/__init__.py +++ b/src/simfmri/simulator/handlers/__init__.py @@ -22,48 +22,11 @@ AbstractHandler, ) -from .acquisition import ( - AcquisitionHandler, - VDSAcquisitionHandler, - RadialAcquisitionHandler, - StackedSpiralAcquisitionHandler, -) -from .activation import ActivationHandler -from .base import AbstractHandler -from .loader import LoadDataHandler, SaveDataHandler -from .noise import ( - GaussianNoiseHandler, - KspaceNoiseHandler, - NoiseHandler, - RicianNoiseHandler, -) -from .phantom import ( - SheppLoganGeneratorHandler, - SlicerHandler, - BigPhantomGeneratorHandler, - RoiDefinerHandler, - BrainwebPhantomHandler, - TextureAdderHandler, -) - __all__ = [ + "AVAILABLE_HANDLERS", "H", + "handler", + "get_handler", + "list_handlers", "AbstractHandler", - "AcquisitionHandler", - "ActivationHandler", - "BigPhantomGeneratorHandler", - "BrainwebPhantomHandler", - "GaussianNoiseHandler", - "KspaceNoiseHandler", - "LoadDataHandler", - "NoiseHandler", - "RicianNoiseHandler", - "RoiDefinerHandler", - "SaveDataHandler", - "SheppLoganGeneratorHandler", - "SlicerHandler", - "TextureAdderHandler", - "VDSAcquisitionHandler", - "RadialAcquisitionHandler", - "StackedSpiralAcquisitionHandler", ]