In preparation for the “initial PSF estimate” RFD discussion tomorrow, I’ve been digging into processCcd to figure out what it actually does. This is non-trivial since no good documentation currently exists for processCcd and there are lots of redirects in the code to subtasks. Here’s my attempt to unravel things. Corrections/improvements are welcome.
- ISR (this happens in setPostIsrExposure using the retargeted isrtask set in jobs package)
- calibrate (if doCalibrate; by calibrateTask->pipe.taks.calibrate)
- create initial PSF from configuration-defined guess (by calibrate.installInitialPsf)
- repair defects but leave CRs in (by self.repair.run, subtask repair->pipe.tasks.repair)
- estimate background (by measAlg.estimateBackground)
- detection (by self.detection.makeSourceCatalog, subtask detection-> meas.algorithms.SourceDetectionTask)
- measurement (by self.initialMeasurement.run, subtask initialMeasurement-> meas.base.SingleFrameMeasurementTask)
- get initial PSF
- if creating new PSF (doPSF)
-astrometry/fit WCS (if doAastrometry; by astrometry.run, subtask astrometry-> meas.astrom.AstrometryTask), otherwise use original WCS
-measure PSF (by self.measurePsf.run, subtask measurePsf-> pipe.tasks.measurePsf.MeasurePsfTask) - elseif there is an existing PSF use that (if hasPsf)
- else no initial psf
- if creating new PSF (doPSF)
- repair CRs again with better PSF (if doPsf; by repair.run, subtask repair-> pipe.tasks.repair)
- estimate background again ignored pixels affected by sources (if doBackground; by measAlg.estimateBackground)
- measurement again (by self.measurement.run, subtask measurement-> meas.base.SingleFrameMeasurementTask)
- do measurement with aperture correction (if doMeasureApCorr)
- astrometry/fit WCS (if doAstrometry; by self.astrometry.run, subtask astrometry-> meas.astrom.AstrometryTask)
- photometric calibration (if doPhotCal; by self.photocal.run, subtask photocal-> pipe.tasks.photoCal.PhotoCalTask)
- process the image (via ProcessImageTask)
- detection (if doDetection; by self.detection.run, subtask detection-> meas.algorithms.SourceDetectionTask)
- deblend (if doDeblend; by self.deblend.run, subtask deblend-> meas.deblender.SourceDeblendTask)
- measurement (if doMeasurement; by self.measurement.run, subtask measurement-> meas.base.SingleFrameMeasurementTask)