Skip to content

Commit

Permalink
Merge 165ac18 into 037a8e3
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiang87 committed Jan 16, 2019
2 parents 037a8e3 + 165ac18 commit 2cb822e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions python/desc/imsim/camera_readout.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ def write_amplifier_image(self, amp_name, outfile, overwrite=True):
output.writeto(outfile, overwrite=overwrite)

def write_fits_file(self, outfile, overwrite=True, run_number=None,
lsst_num='LCA-11021_RTM-000', compress=True):
lsst_num='LCA-11021_RTM-000', compress=True,
image_type='SKYEXP'):
"""
Write the processed eimage data as a multi-extension FITS file.
Expand All @@ -468,6 +469,8 @@ def write_fits_file(self, outfile, overwrite=True, run_number=None,
Run number. If None, then the visit number is used.
compress: bool [True]
Use RICE_1 compression for each image HDU.
image_type str ['SKYEXP']
Image type to write to the `OBSTYPE` and `IMGTYPE` keywords.
"""
output = fits.HDUList(fits.PrimaryHDU())
output[0].header = self.eimage[0].header
Expand All @@ -478,7 +481,7 @@ def write_fits_file(self, outfile, overwrite=True, run_number=None,
output[0].header['TIMESYS'] = 'TAI'
output[0].header['LSST_NUM'] = lsst_num
output[0].header['TESTTYPE'] = 'IMSIM'
output[0].header['IMGTYPE'] = 'SKYEXP'
output[0].header['IMGTYPE'] = image_type
output[0].header['OBSTYPE'] = output[0].header['IMGTYPE']
output[0].header['MONOWL'] = -1
raft, ccd = output[0].header['CHIPID'].split('_')
Expand Down
2 changes: 1 addition & 1 deletion python/desc/imsim/imSim.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ def add_cosmic_rays(gs_interpreter, phot_params):
crs.set_seed(cr_seed)
gs_interpreter.detectorImages[name] = \
galsim.Image(crs.paint(imarr, exptime=exptime), wcs=image.wcs)
image.wcs.fitsHeader.set('CR_SEED', cr_seed)
image.wcs.fitsHeader.set('CR_SEED', str(cr_seed))


def add_treering_info(detectors, tr_filename=None):
Expand Down

0 comments on commit 2cb822e

Please sign in to comment.