- Timestamp:
- Jan 27, 2010, 9:17:17 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/psphot.stack.20100120/src/psphotLoadPSF.c
r26681 r26691 2 2 3 3 // load an externally supplied psf model 4 pmPSF *psphotLoadPSFReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe) { 4 bool psphotLoadPSFReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe) { 5 6 bool status; 5 7 6 8 // find the currently selected readout 7 9 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 8 psAssert ( readout, "missing file?");10 psAssert (file, "missing file?"); 9 11 10 12 // find the currently selected chip … … 13 15 14 16 // find the currently selected readout 15 pmReadout *readout = pmFPA fileThisReadout (view, file->fpa);17 pmReadout *readout = pmFPAviewThisReadout (view, file->fpa); 16 18 if (!readout) return false; 17 19 18 20 // check if a PSF model is supplied by the user 19 pmPSF *psf = psMetadataLookupPtr ( NULL, chip->analysis, "PSPHOT.PSF");21 pmPSF *psf = psMetadataLookupPtr (&status, chip->analysis, "PSPHOT.PSF"); 20 22 if (psf == NULL) { 21 23 psLogMsg ("psphot", 3, "no psf supplied for this chip"); … … 30 32 31 33 // save PSF on readout->analysis 32 if (!psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_DATA_PTR, "psphot psf model", psf)) {34 if (!psMetadataAddPtr (readout->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_META_REPLACE | PS_DATA_UNKNOWN, "psphot psf model", psf)) { 33 35 psError (PSPHOT_ERR_UNKNOWN, false, "problem saving sources on readout"); 34 36 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
