diff --git a/CHANGES.md b/CHANGES.md index 9811672ca..3aac53cc0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ ------------------ - Fixed a bug that would stop preview frames from being retried if they failed even once. - Hotfix to remove double division by exposure time when creating master darks +- Fixed bug that prevented calibration comparison being run on skyflats 0.9.3 (2018-05-10) ------------------ diff --git a/banzai/images.py b/banzai/images.py index faa8c3353..9d8bf7c08 100644 --- a/banzai/images.py +++ b/banzai/images.py @@ -42,6 +42,11 @@ def __init__(self, pipeline_context, filename=None, data=None, header=None, self.site = header.get('SITEID') self.instrument = header.get('INSTRUME') + if self.site is not None and self.instrument is not None: + self.telescope_id = dbs.get_telescope_id(self.site, self.instrument, + db_address=pipeline_context.db_address) + else: + self.telescope_id = None self.epoch = str(header.get('DAY-OBS')) self.nx = header.get('NAXIS1') self.ny = header.get('NAXIS2') @@ -55,8 +60,6 @@ def __init__(self, pipeline_context, filename=None, data=None, header=None, self.ccdsum = header.get('CCDSUM') self.filter = header.get('FILTER') - self.telescope_id = dbs.get_telescope_id(self.site, self.instrument, - db_address=pipeline_context.db_address) self.obstype = header.get('OBSTYPE') self.exptime = float(header.get('EXPTIME')) diff --git a/banzai/main.py b/banzai/main.py index a25c6f130..3bcac6cd7 100755 --- a/banzai/main.py +++ b/banzai/main.py @@ -450,7 +450,7 @@ def on_message(self, body, message): # Increment the number of tries for this file dbs.increment_preview_try_number(path, db_address=self.pipeline_context.db_address) - run(stages_to_do, self.pipeline_context, image_types=['EXPOSE', 'STANDARD', 'BIAS', 'DARK', 'FLAT']) + run(stages_to_do, self.pipeline_context, image_types=['EXPOSE', 'STANDARD', 'BIAS', 'DARK', 'SKYFLAT']) dbs.set_preview_file_as_processed(path, db_address=self.pipeline_context.db_address) except Exception as e: diff --git a/banzai/stages.py b/banzai/stages.py index 0335a2e30..c5e463b0b 100755 --- a/banzai/stages.py +++ b/banzai/stages.py @@ -226,4 +226,4 @@ def apply_master_calibration(self, images, master_calibration_image, logging_tag @abc.abstractmethod def noise_model(self, image): - return np.zeros(image.data.size) + return np.ones(image.data.size)