Skip to content

Commit

Permalink
Merge pull request #109 from LCOGT/fix/calibration_checker
Browse files Browse the repository at this point in the history
Fix/calibration checker
  • Loading branch information
cmccully authored May 18, 2018
2 parents ed51b91 + 55e2408 commit 7d0870e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
------------------
Expand Down
7 changes: 5 additions & 2 deletions banzai/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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'))
Expand Down
2 changes: 1 addition & 1 deletion banzai/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion banzai/stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 7d0870e

Please sign in to comment.