aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim
diff options
context:
space:
mode:
Diffstat (limited to 'fg21sim')
-rw-r--r--fg21sim/sky.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/fg21sim/sky.py b/fg21sim/sky.py
index 17ffd62..7fac16d 100644
--- a/fg21sim/sky.py
+++ b/fg21sim/sky.py
@@ -257,6 +257,14 @@ class SkyBase:
"File creation date")
return hdr
+ @header.setter
+ def header(self, hdr):
+ """
+ Update the supplied header to the FITS header, but do NOT
+ overwrite the original keywords.
+ """
+ self.header_.extend(hdr, update=False)
+
def add_header(self, key, value, comment=None):
"""
Add/update a key to the FITS header.
@@ -266,6 +274,12 @@ class SkyBase:
else:
self.header_[key] = (value, comment)
+ def add_history(self, history):
+ """
+ Add history to the FITS header.
+ """
+ self.header_.add_history(history)
+
def copy(self):
"""
Return a (deep) copy of this instance.
@@ -584,10 +598,19 @@ class SkyPatch(SkyBase):
"""
hdr = super().header
hdr.extend(self.wcs.to_header(), update=True)
+ hdr["OBJECT"] = "Sky Patch"
+ hdr["EXTNAME"] = "IMAGE"
hdr["RA0"] = (self.center[0], "R.A. of patch center [deg]")
hdr["DEC0"] = (self.center[1], "Dec. of patch center [deg]")
return hdr
+ @header.setter
+ def header(self, hdr):
+ """
+ XXX: How to avoid this duplicate???
+ """
+ self.header_.extend(hdr, update=False)
+
@property
def wcs(self):
"""