From 85f8cbc6731a324915f6d5eac2681267f0d9f48d Mon Sep 17 00:00:00 2001 From: vertighel <davide.ricci82@gmail.com> Date: Fri, 11 Apr 2025 17:32:46 +0200 Subject: [PATCH] Trim comments --- noche/headers/header_base_v1.ini | 6 +++--- noche/noche.py | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/noche/headers/header_base_v1.ini b/noche/headers/header_base_v1.ini index 57d62c1..f0d2d2a 100644 --- a/noche/headers/header_base_v1.ini +++ b/noche/headers/header_base_v1.ini @@ -12,8 +12,8 @@ OBSERVER = | Observer name [Object] OBJECT = | Name of observed object -RA = | [hh:mm:ss.ss] Right Ascension in sexagesimal format -DEC = | [+dd:mm:ss.ss] Declination in sexagesimal format +RA = | [hh:mm:ss.ss] Right Ascension, sexagesimal +DEC = | [+dd:mm:ss.ss] Declination, sexagesimal RA_DEG = | [deg] Right Ascension in decimal degrees DEC_DEG = | [deg] Declination in decimal degrees ALT = | [deg] Altitude of object above horizon @@ -26,7 +26,7 @@ AIRMASS = | Approximate air mass [Time] DATE = | [YYYY-MM-DD] File creation date -DATE-OBS = | [YYYY-MM-DDTHH:MM:SS] UTC date and time of observation +DATE-OBS = | [YYYY-MM-DDTHH:MM:SS] UTC observation date MJD-OBS = | [d] Modified Julian Date of observation [Telescope] diff --git a/noche/noche.py b/noche/noche.py index 4c31bb7..6d67c3c 100644 --- a/noche/noche.py +++ b/noche/noche.py @@ -98,8 +98,9 @@ class Noche: try: val, comment = value.split("|") + comment = comment.strip() except ValueError: - # HISTORY and COMMENT have no value + # HISTORY and COMMENT have no comment val, comment = value, None val = self._parse(val) @@ -109,6 +110,19 @@ class Noche: def load_noctis_observatory(self, name='oarpaf', flavor=None): + """ + Load one of the NOCTIS observatory parameters such as + location and detector specifics, + and update relevant FITS keywords. + + Parameters + ---------- + name : str + One of the supported observatories. + flavor : str, optional + Section name of the configuration file. If not specified, takes the first one. + """ + data_dir = Path(__file__).parent / self._obs_dir ini_path = data_dir / f"{name}.ini" -- GitLab