- Timestamp:
- Apr 30, 2022, 4:30:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraAnalysis.c
r42183 r42186 20 20 21 21 // loop over the input images 22 pmFPAfile *input = psMetadataLookupPtr ( NULL, config->files, "FPCAMERA.INPUT");22 pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "FPCAMERA.INPUT"); 23 23 if (!input) ESCAPE(FPCAMERA_ERR_CONFIG, "Can't find or interpret output file rule FPCAMERA.INPUT!"); 24 24 25 25 // astrometry reference (smf) 26 pmFPAfile *astrom = psMetadataLookupPtr ( NULL, config->files, "FPCAMERA.INPUT.ASTROM");26 pmFPAfile *astrom = psMetadataLookupPtr (&status, config->files, "FPCAMERA.INPUT.ASTROM"); 27 27 if (!astrom) ESCAPE(FPCAMERA_ERR_CONFIG, "Can't find or interpret output file rule FPCAMERA.INPUT.ASTROM!"); 28 28 … … 33 33 pmFPAfileActivate (config->files, true, "FPCAMERA.INPUT.VARIANCE"); 34 34 pmFPAfileActivate (config->files, true, "FPCAMERA.RESID"); 35 // Note FPCAMERA.RESID is tied to FPCAMERA.INPUT so they must be active in the same block. 35 pmFPAfileActivate (config->files, true, "PSPHOT.PSF.LOAD"); // if this file is defined, we need to activate it now 36 // Note: the output file FPCAMERA.RESID is tied to FPCAMERA.INPUT so they must be active in the same block. 36 37 37 38 view = pmFPAviewAlloc (0); … … 57 58 58 59 fpcameraChooseRefstars (input, astrom, view); 60 61 // Provide a simple (wrong) PSF as a default if psf model is not supplied with -psf or -psflist. 62 // The user-supplied psf model will replace this one on a chip-by-chip basis 63 // pmPSF *psf = pmPSFBuildSimple ("PS_MODEL_PS1_V1", 5.0, 5.0, 0.0, 0.5); 64 pmPSF *psf = pmPSFBuildSimple ("PS_MODEL_GAUSS", 5.0, 5.0, 0.0); 65 psf->fieldNx = readout->image->numCols; 66 psf->fieldNy = readout->image->numRows; 67 psMetadataAddPtr (readout->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_META_REPLACE | PS_DATA_UNKNOWN, "psphot PSF model", psf); 68 psFree (psf); 69 70 if (!psphotForcedReadout (config, view, "FPCAMERA.INPUT")) ESCAPE(FPCAMERA_ERR_DATA, "failure in psphotForcedReadout"); 59 71 } 72 // drop all versions of the internal files 73 status = true; 74 status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL"); 75 status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL.STDEV"); 76 status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKGND"); 77 if (!status) ESCAPE(FPCAMERA_ERR_PROG, "trouble dropping internal files"); 60 78 } 61 79 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE(FPCAMERA_ERR_IO, "failure in IOChecks(AFTER) at Chip"); … … 72 90 // chip->process is set (unset) based on command-line -chip selections (in fpcameraArguments) 73 91 // chip->file_exists is set (in pmFPAFlags.c:pmChipSetFileStatus) by pmFPAfileDefineFromArgs (in pmFPAAddSource...) 92 93 /* 94 // XXX set sxx, etc from FWHM in recipe 95 pmPSF *psf = pmPSFBuildSimple (modelNames->data[0], 1.0, 1.0, 0.0, 1.0); 96 psf->fieldNx = readout->image->numCols; 97 psf->fieldNy = readout->image->numRows; 98 psFree (modelNames); 99 100 */
Note:
See TracChangeset
for help on using the changeset viewer.
