diff --git a/winterdrp/paths.py b/winterdrp/paths.py index c130381b5..f992ba569 100644 --- a/winterdrp/paths.py +++ b/winterdrp/paths.py @@ -166,8 +166,9 @@ def parse_image_list( flat_frame_key = 'FLATNAME' bias_frame_key = 'BIASNAME' dark_frame_key = 'DARKNAME' +coadd_key = "COADDS" -core_fields = ["OBSCLASS", "TARGET", "UTCTIME"] +core_fields = ["OBSCLASS", "TARGET", "UTCTIME", coadd_key, proc_history_key] class ProcessingError(Exception): diff --git a/winterdrp/pipelines/wirc/wirc_pipeline.py b/winterdrp/pipelines/wirc/wirc_pipeline.py index aded285e3..0d05f4711 100644 --- a/winterdrp/pipelines/wirc/wirc_pipeline.py +++ b/winterdrp/pipelines/wirc/wirc_pipeline.py @@ -18,6 +18,10 @@ from winterdrp.downloader.caltech import download_via_ssh from winterdrp.processors.utils.image_loader import ImageLoader from winterdrp.processors.utils.image_selector import ImageSelector, ImageBatcher, ImageDebatcher +from winterdrp.paths import coadd_key, proc_history_key +import logging + +logger = logging.getLogger(__name__) def wirc_astrometric_catalog_generator( @@ -49,6 +53,11 @@ def load_raw_wirc_image( header["TARGET"] = header["OBJECT"].lower() header["UTCTIME"] = header["UTSHUT"] header["MJD-OBS"] = Time(header['UTSHUT']).mjd + if coadd_key not in header.keys(): + logger.debug(f"No {coadd_key} entry. Setting coadds to 1.") + header[coadd_key] = 1 + if proc_history_key not in header.keys(): + header[proc_history_key] = "" return data, header