<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">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:<div class=""><br class=""></div><div class=""><pre style="box-sizing: border-box; overflow: auto; font-size: 14px; padding: 0px; margin-top: 0px; margin-bottom: 0px; line-height: 17.000059127807617px; word-break: break-all; word-wrap: break-word; border: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; white-space: pre-wrap; vertical-align: baseline;" class=""><span class="ansicyan" style="box-sizing: border-box; color: rgb(70, 130, 180);"><span class="ansigreen" style="box-sizing: border-box; color: rgb(0, 100, 0);"><span class="ansicyan" style="box-sizing: border-box; color: rgb(70, 130, 180);"><span class="ansigreen" style="box-sizing: border-box; color: rgb(0, 100, 0);"><span class="ansicyan" style="box-sizing: border-box; color: rgb(70, 130, 180);"><span class="ansigreen" style="box-sizing: border-box; color: rgb(0, 100, 0);"><span class="ansicyan" style="box-sizing: border-box; color: rgb(70, 130, 180);"><span class="ansigreen" style="box-sizing: border-box; color: rgb(0, 100, 0);"><span class="ansicyan" style="box-sizing: border-box; color: rgb(70, 130, 180);"><span class="ansigreen" style="box-sizing: border-box; color: rgb(0, 100, 0);"><span class="ansired" style="box-sizing: border-box; color: rgb(139, 0, 0);"><span class="ansired" style="box-sizing: border-box;">FatalAlgorithmError</span>:
File "src/<a href="http://SdssCentroid.cc" class="">SdssCentroid.cc</a>", 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'
</span></span></span></span></span></span></span></span></span></span></span></pre></div><div class=""><span class="ansicyan" style="box-sizing: border-box; color: rgb(70, 130, 180);"><span class="ansigreen" style="box-sizing: border-box; color: rgb(0, 100, 0);"><span class="ansicyan" style="box-sizing: border-box; color: rgb(70, 130, 180);"><span class="ansigreen" style="box-sizing: border-box; color: rgb(0, 100, 0);"><span class="ansicyan" style="box-sizing: border-box; color: rgb(70, 130, 180);"><span class="ansigreen" style="box-sizing: border-box; color: rgb(0, 100, 0);"><span class="ansicyan" style="box-sizing: border-box; color: rgb(70, 130, 180);"><span class="ansigreen" style="box-sizing: border-box; color: rgb(0, 100, 0);"><span class="ansicyan" style="box-sizing: border-box; color: rgb(70, 130, 180);"><span class="ansigreen" style="box-sizing: border-box; color: rgb(0, 100, 0);"><span class="ansired" style="box-sizing: border-box; color: rgb(139, 0, 0);"><br class=""></span></span></span></span></span></span></span></span></span></span></span></div><div class="">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:</div><div class="">- afw.math.FixedKernel(‘psf_fits_file.fits’)</div><div class="">- First creating an exposure from the ‘psf_fits_file.fits’ then feeding the image from this into afw.math.FixedKernel()</div><div class=""><br class=""></div><div class="">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 <a href="http://lsst-web.ncsa.illinois.edu/doxygen/x_Release10.0DoxyDoc/classlsst_1_1afw_1_1math_1_1_fixed_kernel.html#a645e945573d57612d4d5cd123e763c27" class="">doxygen tealeaves</a> to figure out the correct input.</div><div class=""><br class=""></div><div class="">I have also tried to set the PSF in the postage stamp, e.g.:</div><div class="">- exposure.setPsf(‘psf_fits_file.fits’)</div><div class="">- or converring the pdf to an image first and feeding that to exposure.setPsf()</div><div class="">all to no avail.</div><div class=""><br class=""></div><div class="">Any help associating this GalSim PSF with the exposure would be greatly appreciated.</div><div class=""><br class=""></div><div class="">Thank you,</div><div class="">Will</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>