[LSST|dm-users 670] Using GalSim PSF's with DM Stack

Will Dawson will at dawsonresearch.com
Fri May 22 15:34:18 PDT 2015


So I am trying to run some of the lsst.meas.base algorithms on a postage stamp that I created with GalSim and some of them are complaining that:

FatalAlgorithmError: 
  File "src/SdssCentroid.cc", line 448, in virtual void lsst::meas::base::SdssCentroidAlgorithm::measure(afw::table::SourceRecord &, const afw::image::Exposure<float> &) const
    SdssCentroid algorithm requires a Psf with every exposure {0}
lsst::meas::base::FatalAlgorithmError: 'SdssCentroid algorithm requires a Psf with every exposure'

So in an attempt to add a PSF to the GalSim postage stamp exposure, I first output the PSF that I used to generate the GalSim postage stamp as a fits file. Note that this is a fits image of a normalized PSF that this has them same pixel scale as the image. Jim suggested that then use afw.math.FixedKernel() and then create a KernelPSF from the FixedKernel, but I am not sure how to do this and my naive attempts have failed. I’ve tried things like:
- afw.math.FixedKernel(‘psf_fits_file.fits’)
- First creating an exposure from the ‘psf_fits_file.fits’ then feeding the image from this into afw.math.FixedKernel()

But I get complaints about the format of the input and it is clear that I am not using the function correctly. I am afraid that I am unable to interpret the doxygen tealeaves <http://lsst-web.ncsa.illinois.edu/doxygen/x_Release10.0DoxyDoc/classlsst_1_1afw_1_1math_1_1_fixed_kernel.html#a645e945573d57612d4d5cd123e763c27> to figure out the correct input.

I have also tried to set the PSF in the postage stamp, e.g.:
- exposure.setPsf(‘psf_fits_file.fits’)
- or converring the pdf to an image first and feeding that to exposure.setPsf()
all to no avail.

Any help associating this GalSim PSF with the exposure would be greatly appreciated.

Thank you,
Will





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lsst.org/pipermail/dm-users/attachments/20150522/15acda72/attachment.html>


More information about the dm-users mailing list