Skip to content

Commit

Permalink
Merge 0ddad33 into 037a8e3
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiang87 committed Jan 16, 2019
2 parents 037a8e3 + 0ddad33 commit 4a43553
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ execute the `setup imsim` command, and that command can be issued from
any directory. The `scons` build step needs only to be re-run if a
new command line executable is added to the `bin.src` folder.

### obs_lsstCam
### obs_lsst
The CCD pixel and LSST focalplane geometries are obtained from the
lsst/obs_lsstCam package, which is not yet part of the standard LSST
lsst/obs_lsst package, which is not yet part of the standard LSST
distribution. Until it is, you'll need to clone a copy, set it up,
and build:
```
$ git clone https://github.com/lsst/obs_lsstCam.git
$ cd obs_lsstCam
$ git clone https://github.com/lsst/obs_lsst.git
$ cd obs_lsst
$ setup -r . -j
$ scons
```
Expand Down
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 4a43553

Please sign in to comment.