Skip to content

Commit 0b5f95b

Browse files
committed
fin
1 parent 04b876a commit 0b5f95b

2 files changed

Lines changed: 17 additions & 15 deletions

File tree

autoarray/mask/mask_1d.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
logger = logging.getLogger(__name__)
2222

2323

24+
class Mask1DKeys(Enum):
25+
PIXSCA = "PIXSCA"
26+
ORIGIN = "ORIGIN"
27+
2428
class Mask1D(Mask):
2529
def __init__(
2630
self,
@@ -173,11 +177,8 @@ def header_dict(self) -> Dict:
173177
-------
174178
A dictionary containing the pixel scale of the mask, which can be output to a .fits file.
175179
"""
176-
class GridKeys(Enum):
177-
PIXSCA = "PIXSCA"
178-
ORIGIN = "ORIGIN"
179180

180181
return {
181-
GridKeys.PIXSCA: self.pixel_scales[0],
182-
GridKeys.ORIGIN: self.origin[0],
182+
Mask1DKeys.PIXSCA: self.pixel_scales[0],
183+
Mask1DKeys.ORIGIN: self.origin[0],
183184
}

autoarray/mask/mask_2d.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@
3131
logger = logging.getLogger(__name__)
3232

3333

34+
class Mask2DKeys(Enum):
35+
PIXSCAY = "PIXSCAY"
36+
PIXSCAX = "PIXSCAX"
37+
ORIGINY = "ORIGINY"
38+
ORIGINX = "ORIGINX"
39+
40+
3441
class Mask2D(Mask):
3542
# noinspection PyUnusedLocal
3643
def __init__(
@@ -718,17 +725,11 @@ def header_dict(self) -> Dict:
718725
A dictionary containing the pixel scale of the mask, which can be output to a .fits file.
719726
"""
720727

721-
class GridKeys(Enum):
722-
PIXSCAY = "PIXSCAY"
723-
PIXSCAX = "PIXSCAX"
724-
ORIGINY = "ORIGINY"
725-
ORIGINX = "ORIGINX"
726-
727728
return {
728-
GridKeys.PIXSCAY: self.pixel_scales[0],
729-
GridKeys.PIXSCAX: self.pixel_scales[1],
730-
GridKeys.ORIGINY: self.origin[0],
731-
GridKeys.ORIGINX: self.origin[1],
729+
Mask2DKeys.PIXSCAY: self.pixel_scales[0],
730+
Mask2DKeys.PIXSCAX: self.pixel_scales[1],
731+
Mask2DKeys.ORIGINY: self.origin[0],
732+
Mask2DKeys.ORIGINX: self.origin[1],
732733
}
733734

734735
@property

0 commit comments

Comments
 (0)