From 651acf13b82539e2ab838663fdfbc3a9ce35178f Mon Sep 17 00:00:00 2001 From: Braden Date: Tue, 19 Mar 2024 14:17:21 -0600 Subject: [PATCH] Renamed ParamsSlopeSolver to ParamsSlopeSolverAbstract --- opencsp/common/lib/deflectometry/ParamsSlopeSolver.py | 5 ----- .../lib/deflectometry/ParamsSlopeSolverAbstract.py | 11 +++++++++++ .../lib/deflectometry/ParamsSlopeSolverParaboloid.py | 6 +++--- .../lib/deflectometry/ParamsSlopeSolverPlano.py | 6 ++---- 4 files changed, 16 insertions(+), 12 deletions(-) delete mode 100644 opencsp/common/lib/deflectometry/ParamsSlopeSolver.py create mode 100644 opencsp/common/lib/deflectometry/ParamsSlopeSolverAbstract.py diff --git a/opencsp/common/lib/deflectometry/ParamsSlopeSolver.py b/opencsp/common/lib/deflectometry/ParamsSlopeSolver.py deleted file mode 100644 index f75e85122..000000000 --- a/opencsp/common/lib/deflectometry/ParamsSlopeSolver.py +++ /dev/null @@ -1,5 +0,0 @@ -from abc import ABC - - -class ParamsSlopeSolver(ABC): - pass diff --git a/opencsp/common/lib/deflectometry/ParamsSlopeSolverAbstract.py b/opencsp/common/lib/deflectometry/ParamsSlopeSolverAbstract.py new file mode 100644 index 000000000..342a5a719 --- /dev/null +++ b/opencsp/common/lib/deflectometry/ParamsSlopeSolverAbstract.py @@ -0,0 +1,11 @@ +from abc import ABC +from dataclasses import dataclass + + +@dataclass +class ParamsSlopeSolverAbstract(ABC): + """Abstract SlopeSolver input parameters class. Contains parameters + common to all surface types. + """ + robust_least_squares: bool + downsample: int diff --git a/opencsp/common/lib/deflectometry/ParamsSlopeSolverParaboloid.py b/opencsp/common/lib/deflectometry/ParamsSlopeSolverParaboloid.py index 3dec4258c..2add6c2ef 100644 --- a/opencsp/common/lib/deflectometry/ParamsSlopeSolverParaboloid.py +++ b/opencsp/common/lib/deflectometry/ParamsSlopeSolverParaboloid.py @@ -1,10 +1,10 @@ from dataclasses import dataclass +from opencsp.common.lib.deflectometry.ParamsSlopeSolverAbstract import ParamsSlopeSolverAbstract + @dataclass -class ParamsSlopeSolverParaboloid: +class ParamsSlopeSolverParaboloid(ParamsSlopeSolverAbstract): """SlopeSolver input parameters class for parabolic surface type """ initial_focal_lengths_xy: tuple[float, float] - robust_least_squares: bool - downsample: int diff --git a/opencsp/common/lib/deflectometry/ParamsSlopeSolverPlano.py b/opencsp/common/lib/deflectometry/ParamsSlopeSolverPlano.py index 4d95768f6..88e9c9439 100644 --- a/opencsp/common/lib/deflectometry/ParamsSlopeSolverPlano.py +++ b/opencsp/common/lib/deflectometry/ParamsSlopeSolverPlano.py @@ -1,11 +1,9 @@ from dataclasses import dataclass -from opencsp.common.lib.deflectometry.ParamsSlopeSolver import ParamsSlopeSolver +from opencsp.common.lib.deflectometry.ParamsSlopeSolverAbstract import ParamsSlopeSolverAbstract @dataclass -class ParamsSlopeSolverPlano(ParamsSlopeSolver): +class ParamsSlopeSolverPlano(ParamsSlopeSolverAbstract): """SlopeSolver input parameters class for plano (perfectly flat) surface type """ - robust_least_squares: bool - downsample: int