Skip to content

Commit

Permalink
Fix coadd key and calstep key for required
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein committed Jul 12, 2022
1 parent c367738 commit effa59f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion winterdrp/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
9 changes: 9 additions & 0 deletions winterdrp/pipelines/wirc/wirc_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit effa59f

Please sign in to comment.