aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/sky.py
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-08-13 19:22:49 +0800
committerAaron LI <aly@aaronly.me>2017-08-13 19:22:49 +0800
commit13971c087956d3414b0cbcea122f091e4f19db2c (patch)
treea4d61043b029d7fd0b230edd6ed74c18b8303e2b /fg21sim/sky.py
parentc8abb89e71c98c2b2ec3c7360a6c26debf114f21 (diff)
downloadfg21sim-13971c087956d3414b0cbcea122f091e4f19db2c.tar.bz2
sky.py: Add "add_header()" method
Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'fg21sim/sky.py')
-rw-r--r--fg21sim/sky.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/fg21sim/sky.py b/fg21sim/sky.py
index e019b2a..b100a8d 100644
--- a/fg21sim/sky.py
+++ b/fg21sim/sky.py
@@ -186,6 +186,15 @@ class SkyBase:
"File creation date")
return hdr
+ def add_header(self, key, value, comment=None):
+ """
+ Add/update a key to the FITS header.
+ """
+ if comment is None:
+ self.header_[key] = value
+ else:
+ self.header_[key] = (value, comment)
+
def copy(self):
"""
Return a (deep) copy of this instance.