Skip to content

Commit bb30c04

Browse files
committed
black
1 parent 482ce26 commit bb30c04

16 files changed

Lines changed: 23 additions & 35 deletions

File tree

autoarray/abstract_ndarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def output_to_fits(self, file_path: str, overwrite: bool = False):
285285
values=self.native.array,
286286
file_path=file_path,
287287
overwrite=overwrite,
288-
header_dict=self.mask.pixel_scale_header
288+
header_dict=self.mask.header_dict,
289289
)
290290

291291
@property

autoarray/mask/abstract_mask.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def pixel_scale(self) -> float:
7777
return self.pixel_scales[0]
7878

7979
@property
80-
def pixel_scale_header(self) -> Dict:
80+
def header_dict(self) -> Dict:
8181
"""
8282
Returns the pixel scale of the mask as a header dictionary, which can be written to a .fits file.
8383
@@ -122,8 +122,8 @@ def output_to_fits(self, file_path, overwrite=False):
122122
values=self.astype("float"),
123123
file_path=file_path,
124124
overwrite=overwrite,
125-
header_dict=self.pixel_scale_header,
126-
ext_name="mask"
125+
header_dict=self.header_dict,
126+
ext_name="mask",
127127
)
128128

129129
@property

autoarray/mask/mask_1d.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def shape_slim(self) -> Tuple[int]:
161161
return self.shape
162162

163163
@property
164-
def pixel_scale_header(self) -> Dict:
164+
def header_dict(self) -> Dict:
165165
"""
166166
Returns the pixel scales of the mask as a header dictionary, which can be written to a .fits file.
167167
@@ -174,4 +174,5 @@ def pixel_scale_header(self) -> Dict:
174174
"""
175175
return {
176176
"PIXSCA": self.pixel_scales[0],
177-
}
177+
"ORIGIN": self.origin[0],
178+
}

autoarray/mask/mask_2d.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ def unmasked_blurred_array_from(self, padded_array, psf, image_shape) -> Array2D
705705
)
706706

707707
@property
708-
def pixel_scale_header(self) -> Dict:
708+
def header_dict(self) -> Dict:
709709
"""
710710
Returns the pixel scales of the mask as a header dictionary, which can be written to a .fits file.
711711
@@ -719,6 +719,8 @@ def pixel_scale_header(self) -> Dict:
719719
return {
720720
"PIXSCAY": self.pixel_scales[0],
721721
"PIXSCAX": self.pixel_scales[1],
722+
"ORIGINY": self.origin[0],
723+
"ORIGINX": self.origin[1],
722724
}
723725

724726
@property

autoarray/structures/abstract_structure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def pixel_scale(self) -> float:
6060
return self.mask.pixel_scale
6161

6262
@property
63-
def pixel_scale_header(self) -> Dict:
64-
return self.mask.pixel_scale_header
63+
def header_dict(self) -> Dict:
64+
return self.mask.header_dict
6565

6666
@property
6767
def pixel_area(self):

autoarray/structures/arrays/array_1d_util.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,3 @@ def array_1d_via_indexes_1d_from(
185185
]
186186

187187
return array_1d_native
188-
189-

autoarray/structures/arrays/array_2d_util.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,3 @@ def array_2d_native_complex_via_indexes_from(
704704
] = array_2d_slim[slim_index]
705705

706706
return array_2d
707-
708-
709-

autoarray/structures/arrays/kernel_2d.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from astropy.io import fits
21
from astropy import units
32
import numpy as np
43
import scipy.signal

autoarray/structures/arrays/uniform_1d.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from astropy.io import fits
21
import numpy as np
32
from pathlib import Path
43
from typing import Optional, Union, Tuple, List
@@ -217,9 +216,7 @@ def from_fits(
217216
origin
218217
The (x,) scaled units origin of the coordinate system.
219218
"""
220-
array_1d = ndarray_via_fits_from(
221-
file_path=file_path, hdu=hdu
222-
)
219+
array_1d = ndarray_via_fits_from(file_path=file_path, hdu=hdu)
223220

224221
header_sci_obj = header_obj_from(file_path=file_path, hdu=0)
225222
header_hdu_obj = header_obj_from(file_path=file_path, hdu=hdu)

autoarray/structures/arrays/uniform_2d.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from astropy.io import fits
21
import logging
32
import numpy as np
43
from pathlib import Path
@@ -891,9 +890,7 @@ def from_fits(
891890
pixel_scales=1.0,
892891
)
893892
"""
894-
array_2d = ndarray_via_fits_from(
895-
file_path=file_path, hdu=hdu
896-
)
893+
array_2d = ndarray_via_fits_from(file_path=file_path, hdu=hdu)
897894

898895
header_sci_obj = header_obj_from(file_path=file_path, hdu=0)
899896
header_hdu_obj = header_obj_from(file_path=file_path, hdu=hdu)

0 commit comments

Comments
 (0)