Closed DaveStrickland closed 1 year ago
Probably also related to #1
Create a text (YaML) file called test_yaml.yml in the same directory as the NGC 55 premium images with the following contents:
---
observer: iTelescopePremium
telescop: iTelescope T31
target: NGC 55
...
Run ap_add_metadata with --mode=yamlkeyval --yamlfile=test_yaml.yml
. It should run without error and correctly update the target, observer, telescop, and associated observatory and RA, DEC keywords. For example:
python3 ~/git/AstroPhotography/AstroPhotography/scripts/ap_add_metadata.py --target "NGC 55" -l DEBUG Calibrated-iTelescope-Whale_Galaxy_NGC_55-900s-Red-5.fits --mode=yamlkeyval --yamlfile=test_yaml.yml
2022-10-01 08:15:35,986 | ApAddMetadata | INFO | Adding metadata to Calibrated-iTelescope-Whale_Galaxy_NGC_55-900s-Red-5.fits, mode=yamlkeyval.
2022-10-01 08:15:35,986 | ApAddMetadata | INFO | Reading YaML file test_yaml.yml
2022-10-01 08:15:36,017 | ApAddMetadata | DEBUG | Adding OBSERVER=iTelescopePremium to FITS header.
2022-10-01 08:15:36,018 | ApAddMetadata | DEBUG | Adding TELESCOP=iTelescope T31 to FITS header.
2022-10-01 08:15:36,087 | ApAddMetadata | DEBUG | Adding TARGET=NGC 55 to FITS header.
2022-10-01 08:15:38,095 | ApAddMetadata | INFO | Loading extension 0 of FITS file Calibrated-iTelescope-Whale_Galaxy_NGC_55-900s-Red-5.fits
2022-10-01 08:15:38,280 | ApAddMetadata | WARNING | FITS header does not contain these optional keywords: DATE-OBS
2022-10-01 08:15:38,280 | ApAddMetadata | WARNING | Can not compute AIRMASS at start of observation without DATE-OBS value.
2022-10-01 08:15:38,281 | ApAddMetadata | DEBUG | FITS header keywords to be added to output: {'OBSERVER': ('iTelescopePremium', 'From test_yaml.yml'), 'TELESCOP': ('iTelescope T31', 'From test_yaml.yml'), 'TARGET': ('NGC 55', 'From test_yaml.yml'), 'OBSERVAT': ('iTelescope Siding Spring', 'Observatory.'), 'LAT-OBS': (-31.273333333333326, '[deg] Latitude of observatory.'), 'LON-OBS': (149.06972222222223, '[deg] Latitude of observatory.'), 'ALT-OBS': (1117.9999999999284, '[m] Height of observatory.'), 'OBJECT': ('NGC 55', 'Target of observation'), 'OBJNAME': ('NGC 55', 'Target of observation'), 'RA-OBJ': (3.7233417, '[deg] Right Ascension of target'), 'DEC-OBJ': (-39.1966278, '[deg] Declination of target')}
2022-10-01 08:15:38,468 | ApAddMetadata | INFO | Finished updating FITS header of Calibrated-iTelescope-Whale_Galaxy_NGC_55-900s-Red-5.fits
2022-10-01 08:15:38,469 | ApAddMetadata | DEBUG | Finished processing Calibrated-iTelescope-Whale_Galaxy_NGC_55-900s-Red-5.fits
(astro38) azathoth/ ~/Tmp/iTelescopeScratch/Plan-40-NGC55 08:15:39$ python3 ~/git/AstroPhotography/AstroPhotography/scripts/ap_add_metadata.py --target "NGC 55" -l DEBUG Calibrated-iTelescope-Whale_Galaxy_NGC_55-900s-Red-5.fits --mode=yamlkeyval --yamlfile=test_yaml.yml
2022-10-01 08:19:47,665 | ApAddMetadata | INFO | Adding metadata to Calibrated-iTelescope-Whale_Galaxy_NGC_55-900s-Red-5.fits, mode=yamlkeyval.
2022-10-01 08:19:47,666 | ApAddMetadata | INFO | Reading YaML file test_yaml.yml
2022-10-01 08:19:47,684 | ApAddMetadata | DEBUG | Adding OBSERVER=iTelescopePremium to FITS header.
2022-10-01 08:19:47,684 | ApAddMetadata | DEBUG | Adding TELESCOP=iTelescope T31 to FITS header.
2022-10-01 08:19:47,755 | ApAddMetadata | DEBUG | Telescope iTelescope T31, iTelescope Siding Spring
2022-10-01 08:19:47,755 | ApAddMetadata | DEBUG | Adding TARGET=NGC 55 to FITS header.
2022-10-01 08:19:47,791 | ApAddMetadata | INFO | Loading extension 0 of FITS file Calibrated-iTelescope-Whale_Galaxy_NGC_55-900s-Red-5.fits
2022-10-01 08:19:47,891 | ApAddMetadata | WARNING | FITS header does not contain these optional keywords: DATE-OBS
2022-10-01 08:19:47,892 | ApAddMetadata | WARNING | Can not compute AIRMASS at start of observation without DATE-OBS value.
2022-10-01 08:19:47,893 | ApAddMetadata | DEBUG | FITS header keywords to be added to output: {'OBSERVER': ('iTelescopePremium', 'From test_yaml.yml'), 'TELESCOP': ('iTelescope T31', 'From test_yaml.yml'), 'TARGET': ('NGC 55', 'From test_yaml.yml'), 'OBSERVAT': ('iTelescope Siding Spring', 'Observatory.'), 'LAT-OBS': (-31.273333333333326, '[deg] Latitude of observatory.'), 'LON-OBS': (149.06972222222223, '[deg] Latitude of observatory.'), 'ALT-OBS': (1117.9999999999284, '[m] Height of observatory.'), 'OBJECT': ('NGC 55', 'Target of observation'), 'OBJNAME': ('NGC 55', 'Target of observation'), 'RA-OBJ': (3.7233417, '[deg] Right Ascension of target'), 'DEC-OBJ': (-39.1966278, '[deg] Declination of target')}
2022-10-01 08:19:48,187 | ApAddMetadata | INFO | Finished updating FITS header of Calibrated-iTelescope-Whale_Galaxy_NGC_55-900s-Red-5.fits
2022-10-01 08:19:48,188 | ApAddMetadata | DEBUG | Finished processing Calibrated-iTelescope-Whale_Galaxy_NGC_55-900s-Red-5.fits
iTelescope Premium Image sets come pre-calibrated and without standard FITS header metadata.
Attemping to run ap_add_metadata.py (ApAddMetadata) on one of these images fails: