Skip to content

Commit 70843c0

Browse files
committed
mrge succcess
2 parents 8d2b338 + a331718 commit 70843c0

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

autoarray/mask/mask_1d.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
from enum import Enum
34
import logging
45
import numpy as np
56
from pathlib import Path
@@ -20,6 +21,10 @@
2021
logger = logging.getLogger(__name__)
2122

2223

24+
class Mask1DKeys(Enum):
25+
PIXSCA = "PIXSCA"
26+
ORIGIN = "ORIGIN"
27+
2328
class Mask1D(Mask):
2429
def __init__(
2530
self,
@@ -172,7 +177,8 @@ def header_dict(self) -> Dict:
172177
-------
173178
A dictionary containing the pixel scale of the mask, which can be output to a .fits file.
174179
"""
180+
175181
return {
176-
"PIXSCA": self.pixel_scales[0],
177-
"ORIGIN": self.origin[0],
182+
Mask1DKeys.PIXSCA: self.pixel_scales[0],
183+
Mask1DKeys.ORIGIN: self.origin[0],
178184
}

autoarray/mask/mask_2d.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22
import logging
3+
from enum import Enum
34
import numpy as np
45
from pathlib import Path
56
from typing import TYPE_CHECKING, Dict, List, Tuple, Union
@@ -30,6 +31,13 @@
3031
logger = logging.getLogger(__name__)
3132

3233

34+
class Mask2DKeys(Enum):
35+
PIXSCAY = "PIXSCAY"
36+
PIXSCAX = "PIXSCAX"
37+
ORIGINY = "ORIGINY"
38+
ORIGINX = "ORIGINX"
39+
40+
3341
class Mask2D(Mask):
3442
# noinspection PyUnusedLocal
3543
def __init__(
@@ -657,11 +665,12 @@ def header_dict(self) -> Dict:
657665
-------
658666
A dictionary containing the pixel scale of the mask, which can be output to a .fits file.
659667
"""
668+
660669
return {
661-
"PIXSCAY": self.pixel_scales[0],
662-
"PIXSCAX": self.pixel_scales[1],
663-
"ORIGINY": self.origin[0],
664-
"ORIGINX": self.origin[1],
670+
Mask2DKeys.PIXSCAY: self.pixel_scales[0],
671+
Mask2DKeys.PIXSCAX: self.pixel_scales[1],
672+
Mask2DKeys.ORIGINY: self.origin[0],
673+
Mask2DKeys.ORIGINX: self.origin[1],
665674
}
666675

667676
@property

autoarray/plot/multi_plotters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def output_to_fits(
301301
The list of function names that are called to plot the figures on the subplot.
302302
figure_name_list
303303
The list of figure names that are plotted on the subplot.
304-
filenane
304+
filename
305305
The filename that the .fits file is output to.
306306
tag_list
307307
The list of tags that are used to set the `EXTNAME` of each hdu of the .fits file.

0 commit comments

Comments
 (0)