Replacing PsfAttributes DM-11026
Child task of DM-2259
Question: does computeShape().getDeterminant return the right answer?

Reasonable for 1pix < sigma < 9pix  for  simple 40X40 pixel model SingleGaussianPsf(40, 40, inputSig).
And I think this ticket (https://jira.lsstcorp.org/browse/DM-5824) is saying that sub-pixel sigmas can’t be estimated (I wouldn’t expect that they would)  filed under ticket.

ModelPsfMatchTask (WarpedPSF (warped PsfExPsfs)):


Running makeCoaddTempExp on HSC-I band data on ci_hsc:

makeCoaddTempExp.py /Users/yusra/lsst_devel/LSST/repos/HSC/ci_hsc/DATA --rerun ci_hsc_ps1_2  --id patch=5,4 tract=0 filter=HSC-I      --selectId visit=903986 ccd=23 --selectId visit=903986 ccd=100 --selectId visit=904014 ccd=1 --selectId visit=904014 ccd=6 --selectId visit=904014 ccd=12 --selectId visit=903990 ccd=18 --selectId visit=903990 ccd=25 --selectId visit=904010 ccd=4 --selectId visit=904010 ccd=10 --selectId visit=904010 ccd=100 --selectId visit=903988 ccd=16 --selectId visit=903988 ccd=17 --selectId visit=903988 ccd=23 --selectId visit=903988 ccd=24 --doraise -c doApplyUberCal=False  modelPsf.size=39  makePsfMatched=True makeDirect=False --configfile ./psfMatchedWarpConfig.py  --no-versions --clobber-config

Shows that PsfAttributes gives nonsensical Gaussian widths.  A FWHM of 0.860 is a common failure model. computeShape().getDeterminant() gives approx same FWHM for calexps in a single visit (they’re consistent). 

Visit 903988

Visit 903986
Visit 904010
visit 904014


Conclusion:  Replacing PsfAttri with computeShape is safe for this use case, and should be done ASAP. 

ModelPsfMatchTask (CoaddPsf):


PsfAttr quits on CoaddPsf, making it impossible to compare, but computeShape gives FWHMs of 
~0.70 arcseconds which are sane.



ImageDifferenceTask 


When testing on  on SDSS Stripe82: (PcaPsf vs. CoaddPsf(PcaPsf)) and Decam PcaPsf vs PcaPsf, 
computeShape returns a very different answer:

.computeShape() does not give the same answer as PsfAttributes for Stripe82 PcaPsfs: 

To reproduce on lsst-dev:
processCcd.py /lsst7/stripe82/dr7/runs/  --output /scratch/yusra/calexp_dir --id run=4192 camcol=4 filter=r field=104

processCcd.py /lsst7/stripe82/dr7/runs/  --output /scratch/yusra/calexp_dir_psf --id run=4192 camcol=4 filter=r field=104 --config charImage.doMeasurePsf=True