diff options
author | Aaron LI <aly@aaronly.me> | 2017-08-13 19:22:49 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-08-13 19:22:49 +0800 |
commit | 13971c087956d3414b0cbcea122f091e4f19db2c (patch) | |
tree | a4d61043b029d7fd0b230edd6ed74c18b8303e2b | |
parent | c8abb89e71c98c2b2ec3c7360a6c26debf114f21 (diff) | |
download | fg21sim-13971c087956d3414b0cbcea122f091e4f19db2c.tar.bz2 |
sky.py: Add "add_header()" method
Signed-off-by: Aaron LI <aly@aaronly.me>
-rw-r--r-- | fg21sim/sky.py | 9 |
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. |