diff --git a/.travis.yml b/.travis.yml index a27c0bf7..40a03c1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ dist: trusty compiler: gcc env: - - OS_TYPE=centos OS_VERSION=7 DOCKER_IMAGE=lsstdesc/stack-sims:w_2018_48-sims_2_13_0 + - OS_TYPE=centos OS_VERSION=7 DOCKER_IMAGE=lsstdesc/stack-sims:w_2018_49-sims_2_13_1 services: - docker diff --git a/README.md b/README.md index e552d9fe..31c95209 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/python/desc/imsim/camera_readout.py b/python/desc/imsim/camera_readout.py index 02740563..b9c1e38e 100644 --- a/python/desc/imsim/camera_readout.py +++ b/python/desc/imsim/camera_readout.py @@ -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. @@ -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 @@ -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('_') diff --git a/python/desc/imsim/imSim.py b/python/desc/imsim/imSim.py index 1d52f93e..b66f6a19 100644 --- a/python/desc/imsim/imSim.py +++ b/python/desc/imsim/imSim.py @@ -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): diff --git a/travis_test.sh b/travis_test.sh index 8669995a..e1e03c73 100755 --- a/travis_test.sh +++ b/travis_test.sh @@ -8,7 +8,11 @@ pip install pylint git clone https://github.com/lsst/obs_lsst.git cd obs_lsst setup -r . -j -scons +# Build the obs_lsst package, but avoid the time consuming and lengthy +# output from the 'tests' target. The version module is built by the +# 'tests', so build that explicitly since it is imported by the +# package itself. +scons lib python shebang examples doc policy python/lsst/obs/lsst/version.py cd .. eups declare imsim -r ${TRAVIS_BUILD_DIR} -t current setup imsim