Skip to content

Commit 2af5688

Browse files
Jammy2211Jammy2211
authored andcommitted
renaming and structuring stuff
1 parent fa80a50 commit 2af5688

20 files changed

Lines changed: 44 additions & 44 deletions

autoarray/fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,13 @@ def make_regularization_constant_split():
332332

333333

334334
def make_regularization_adaptive_brightness():
335-
return aa.reg.AdaptiveBrightness(
335+
return aa.reg.Adapt(
336336
inner_coefficient=0.1, outer_coefficient=10.0, signal_scale=0.5
337337
)
338338

339339

340340
def make_regularization_adaptive_brightness_split():
341-
return aa.reg.AdaptiveBrightnessSplit(
341+
return aa.reg.AdaptSplit(
342342
inner_coefficient=0.1, outer_coefficient=10.0, signal_scale=0.5
343343
)
344344

autoarray/inversion/pixelization/mappers/delaunay.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def pix_sub_weights_split_points(self) -> PixSubWeights:
203203
The property `pix_sub_weights` property describes the calculation of the `PixSubWeights` object, which contains
204204
numpy arrays describing how data-points and mapper pixels map to one another and the weights of these mappings.
205205
206-
For certain regularization schemes (e.g. `ConstantSplit`, `AdaptiveBrightnessSplit`) regularization uses
206+
For certain regularization schemes (e.g. `ConstantSplit`, `AdaptSplit`) regularization uses
207207
mappings which are split in a cross configuration in order to factor in the derivative of the mapper
208208
reconstruction.
209209

autoarray/inversion/regularization/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
from .constant import Constant
44
from .constant_zeroth import ConstantZeroth
55
from .constant_split import ConstantSplit
6-
from .adaptive_brightness import AdaptiveBrightness
7-
from .adaptive_brightness_split import AdaptiveBrightnessSplit
6+
from .adaptive_brightness import Adapt
7+
from .adaptive_brightness_split import AdaptSplit
88
from .brightness_zeroth import BrightnessZeroth
9-
from .adaptive_brightness_split_zeroth import AdaptiveBrightnessSplitZeroth
9+
from .adaptive_brightness_split_zeroth import AdaptSplitZeroth
1010
from .gaussian_kernel import GaussianKernel
1111
from .exponential_kernel import ExponentialKernel
1212
from .matern_kernel import MaternKernel
13-
from .matern_adaptive_brightness_kernel import MaternAdaptiveBrightnessKernel
13+
from .matern_adaptive_brightness_kernel import MaternAdaptKernel

autoarray/inversion/regularization/abstract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def regularization_weights_from(self, linear_obj: LinearObj, xp=np) -> np.ndarra
140140
(e.g. the ``pixels`` in a ``Mapper``).
141141
142142
For standard regularization (e.g. ``Constant``) are weights are equal, however for adaptive schemes
143-
(e.g. ``AdaptiveBrightness``) they vary to adapt to the data being reconstructed.
143+
(e.g. ``Adapt``) they vary to adapt to the data being reconstructed.
144144
145145
Parameters
146146
----------

autoarray/inversion/regularization/adaptive_brightness.py renamed to autoarray/inversion/regularization/adapt.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
from autoarray.inversion.regularization.abstract import AbstractRegularization
99

1010

11-
def adaptive_regularization_weights_from(
11+
def adapt_regularization_weights_from(
1212
inner_coefficient: float, outer_coefficient: float, pixel_signals: np.ndarray
1313
) -> np.ndarray:
1414
"""
15-
Returns the regularization weights for the adaptive regularization scheme (e.g. ``AdaptiveBrightness``).
15+
Returns the regularization weights for the adaptive regularization scheme (e.g. ``Adapt``).
1616
1717
The weights define the effective regularization coefficient of every mesh parameter (typically pixels
1818
of a ``Mapper``).
@@ -53,10 +53,10 @@ def weighted_regularization_matrix_from(
5353
xp=np,
5454
) -> np.ndarray:
5555
"""
56-
Returns the regularization matrix of the adaptive regularization scheme (e.g. ``AdaptiveBrightness``).
56+
Returns the regularization matrix of the adaptive regularization scheme (e.g. ``Adapt``).
5757
5858
This matrix is computed using the regularization weights of every mesh pixel, which are computed using the
59-
function ``adaptive_regularization_weights_from``. These act as the effective regularization coefficients of
59+
function ``adapt_regularization_weights_from``. These act as the effective regularization coefficients of
6060
every mesh pixel.
6161
6262
The regularization matrix is computed using the pixel-neighbors array, which is setup using the appropriate
@@ -128,7 +128,7 @@ def weighted_regularization_matrix_from(
128128
return mat[:S, :S]
129129

130130

131-
class AdaptiveBrightness(AbstractRegularization):
131+
class Adapt(AbstractRegularization):
132132
def __init__(
133133
self,
134134
inner_coefficient: float = 1.0,
@@ -196,7 +196,7 @@ def regularization_weights_from(self, linear_obj: LinearObj, xp=np) -> np.ndarra
196196
(e.g. the ``pixels`` in a ``Mapper``).
197197
198198
For standard regularization (e.g. ``Constant``) are weights are equal, however for adaptive schemes
199-
(e.g. ``AdaptiveBrightness``) they vary to adapt to the data being reconstructed.
199+
(e.g. ``Adapt``) they vary to adapt to the data being reconstructed.
200200
201201
Parameters
202202
----------
@@ -211,7 +211,7 @@ def regularization_weights_from(self, linear_obj: LinearObj, xp=np) -> np.ndarra
211211
signal_scale=self.signal_scale, xp=xp
212212
)
213213

214-
return adaptive_regularization_weights_from(
214+
return adapt_regularization_weights_from(
215215
inner_coefficient=self.inner_coefficient,
216216
outer_coefficient=self.outer_coefficient,
217217
pixel_signals=pixel_signals,

autoarray/inversion/regularization/adaptive_brightness_split.py renamed to autoarray/inversion/regularization/adapt_split.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
if TYPE_CHECKING:
66
from autoarray.inversion.linear_obj.linear_obj import LinearObj
77

8-
from autoarray.inversion.regularization.adaptive_brightness import AdaptiveBrightness
8+
from autoarray.inversion.regularization.adaptive_brightness import Adapt
99

1010
from autoarray.inversion.regularization import regularization_util
1111

1212

13-
class AdaptiveBrightnessSplit(AdaptiveBrightness):
13+
class AdaptSplit(Adapt):
1414
def __init__(
1515
self,
1616
inner_coefficient: float = 1.0,

autoarray/inversion/regularization/adaptive_brightness_split_zeroth.py renamed to autoarray/inversion/regularization/adaptive_split_zeroth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
if TYPE_CHECKING:
66
from autoarray.inversion.linear_obj.linear_obj import LinearObj
77

8-
from autoarray.inversion.regularization.adaptive_brightness import AdaptiveBrightness
8+
from autoarray.inversion.regularization.adaptive_brightness import Adapt
99
from autoarray.inversion.regularization.brightness_zeroth import BrightnessZeroth
1010
from autoarray.inversion.regularization import regularization_util
1111

1212

13-
class AdaptiveBrightnessSplitZeroth(AdaptiveBrightness):
13+
class AdaptSplitZeroth(Adapt):
1414
def __init__(
1515
self,
1616
zeroth_coefficient: float = 1.0,

autoarray/inversion/regularization/constant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def regularization_weights_from(self, linear_obj: LinearObj, xp=np) -> np.ndarra
104104
(e.g. the ``pixels`` in a ``Mapper``).
105105
106106
For standard regularization (e.g. ``Constant``) are weights are equal, however for adaptive schemes
107-
(e.g. ``AdaptiveBrightness``) they vary to adapt to the data being reconstructed.
107+
(e.g. ``Adapt``) they vary to adapt to the data being reconstructed.
108108
109109
Parameters
110110
----------

autoarray/inversion/regularization/constant_zeroth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def regularization_weights_from(self, linear_obj: LinearObj, xp=np) -> np.ndarra
8787
(e.g. the ``pixels`` in a ``Mapper``).
8888
8989
For standard regularization (e.g. ``Constant``) are weights are equal, however for adaptive schemes
90-
(e.g. ``AdaptiveBrightness``) they vary to adapt to the data being reconstructed.
90+
(e.g. ``Adapt``) they vary to adapt to the data being reconstructed.
9191
9292
Parameters
9393
----------

autoarray/inversion/regularization/exponential_kernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def regularization_weights_from(self, linear_obj: LinearObj, xp=np) -> np.ndarra
8484
(e.g. the ``pixels`` in a ``Mapper``).
8585
8686
For standard regularization (e.g. ``Constant``) are weights are equal, however for adaptive schemes
87-
(e.g. ``AdaptiveBrightness``) they vary to adapt to the data being reconstructed.
87+
(e.g. ``Adapt``) they vary to adapt to the data being reconstructed.
8888
8989
Parameters
9090
----------

0 commit comments

Comments
 (0)