Skip to content

Commit f0892ba

Browse files
Jammy2211Jammy2211
authored andcommitted
black
1 parent 50d7ae8 commit f0892ba

File tree

9 files changed

+24
-23
lines changed

9 files changed

+24
-23
lines changed

autoarray/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
from autoconf.dictable import register_parser
2+
from autofit import conf
3+
4+
conf.instance.register(__file__)
5+
16
from . import exc
27
from . import type
38
from . import util

autoarray/dataset/grids.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
from autoarray import exc
1313

14+
1415
class GridsDataset:
1516
def __init__(
1617
self,
@@ -88,6 +89,7 @@ def __init__(
8889
mask=self.mask, sub_size=self.over_sample_size_pixelization
8990
)
9091

92+
9193
class GridsInterface:
9294
def __init__(
9395
self,

autoarray/exc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,3 @@ class PlottingException(Exception):
104104
"""
105105

106106
pass
107-

autoarray/inversion/inversion/abstract.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def __init__(
8181
"https://pyautolens.readthedocs.io/en/latest/installation/overview.html"
8282
)
8383

84-
8584
self.dataset = dataset
8685

8786
self.linear_obj_list = linear_obj_list

autoarray/inversion/linear_obj/func_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from autoarray.inversion.regularization.abstract import AbstractRegularization
1010
from autoarray.type import Grid1D2DLike
1111

12+
1213
class AbstractLinearObjFuncList(LinearObj):
1314
def __init__(
1415
self,

autoarray/operators/over_sampling/over_sample_util.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,15 @@ def sub_size_radial_bins_from(
166166

167167
return sub_size_list[bin_indices]
168168

169+
169170
from autoarray.geometry import geometry_util
170171

172+
171173
def grid_2d_slim_over_sampled_via_mask_from(
172-
mask_2d: np.ndarray,
173-
pixel_scales: ty.PixelScales,
174-
sub_size: np.ndarray,
175-
origin: Tuple[float, float] = (0.0, 0.0),
174+
mask_2d: np.ndarray,
175+
pixel_scales: ty.PixelScales,
176+
sub_size: np.ndarray,
177+
origin: Tuple[float, float] = (0.0, 0.0),
176178
) -> np.ndarray:
177179
"""
178180
For a sub-grid, every unmasked pixel of its 2D mask with shape (total_y_pixels, total_x_pixels) is divided into
@@ -216,11 +218,9 @@ def grid_2d_slim_over_sampled_via_mask_from(
216218
pixels_in_mask = (np.size(mask_2d) - np.sum(mask_2d)).astype(int)
217219

218220
if isinstance(sub_size, int):
219-
sub_size = np.full(
220-
fill_value=sub_size, shape=pixels_in_mask
221-
)
221+
sub_size = np.full(fill_value=sub_size, shape=pixels_in_mask)
222222

223-
total_sub_pixels = np.sum(sub_size ** 2)
223+
total_sub_pixels = np.sum(sub_size**2)
224224

225225
grid_slim = np.zeros(shape=(total_sub_pixels, 2))
226226

@@ -248,10 +248,10 @@ def grid_2d_slim_over_sampled_via_mask_from(
248248
for y1 in range(sub):
249249
for x1 in range(sub):
250250
grid_slim[sub_index, 0] = -(
251-
y_scaled - y_sub_half + y1 * y_sub_step + (y_sub_step / 2.0)
251+
y_scaled - y_sub_half + y1 * y_sub_step + (y_sub_step / 2.0)
252252
)
253253
grid_slim[sub_index, 1] = (
254-
x_scaled - x_sub_half + x1 * x_sub_step + (x_sub_step / 2.0)
254+
x_scaled - x_sub_half + x1 * x_sub_step + (x_sub_step / 2.0)
255255
)
256256
sub_index += 1
257257

autoarray/structures/grids/uniform_2d.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,17 +189,16 @@ def over_sampled(self):
189189
return self._over_sampled
190190

191191
over_sampled = over_sample_util.grid_2d_slim_over_sampled_via_mask_from(
192-
mask_2d=np.array(self.mask),
193-
pixel_scales=self.mask.pixel_scales,
194-
sub_size=self.over_sampler.sub_size.array.astype("int"),
195-
origin=self.mask.origin,
196-
)
192+
mask_2d=np.array(self.mask),
193+
pixel_scales=self.mask.pixel_scales,
194+
sub_size=self.over_sampler.sub_size.array.astype("int"),
195+
origin=self.mask.origin,
196+
)
197197

198198
self._over_sampled = Grid2DIrregular(values=over_sampled)
199199

200200
return self._over_sampled
201201

202-
203202
@classmethod
204203
def no_mask(
205204
cls,
@@ -703,7 +702,7 @@ def subtracted_from(self, offset: Tuple[(float, float), np.ndarray]) -> "Grid2D"
703702
values=self - np.array(offset),
704703
mask=mask,
705704
over_sample_size=self.over_sample_size,
706-
over_sampled=self.over_sampled - np.array(offset)
705+
over_sampled=self.over_sampled - np.array(offset),
707706
)
708707

709708
@property

test_autoarray/fit/test_fit_imaging.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,3 @@ def test__data_and_model_are_identical__inversion_included__changes_certain_prop
102102
fit.chi_squared + 2.0 + 3.0 - 4.0 + fit.noise_normalization
103103
)
104104
assert fit.figure_of_merit == fit.log_evidence
105-

test_autoarray/test_decorators.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@ def __init__(self, value):
88
@property
99
def value(self):
1010
return self._value
11-
12-
13-

0 commit comments

Comments
 (0)