- Timestamp:
- Feb 14, 2011, 1:05:28 PM (15 years ago)
- Location:
- branches/czw_branch/20101203
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20101203
- Property svn:mergeinfo changed
-
branches/czw_branch/20101203/psphot
- Property svn:mergeinfo changed
-
branches/czw_branch/20101203/psphot/src/psphotStackPSF.c
r28013 r30631 12 12 bool autoPSF = psMetadataLookupBool (&mdok, psphotRecipe, "PSPHOT.STACK.TARGET.PSF.AUTO"); 13 13 14 // Get the recipe values 15 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, "PPSTACK"); // ppStack recipe 16 psAssert(recipe, "We've thrown an error on this before."); 17 18 char *psfModel = psMetadataLookupStr(NULL, recipe, "PSF.MODEL"); // Model for PSF 19 14 20 if (autoPSF) { 15 // Get the recipe values16 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, "PPSTACK"); // ppStack recipe17 psAssert(recipe, "We've thrown an error on this before.");18 19 21 int psfInstances = psMetadataLookupS32(NULL, recipe, "PSF.INSTANCES"); // Number of instances for PSF 20 22 float psfRadius = psMetadataLookupF32(NULL, recipe, "PSF.RADIUS"); // Radius for PSF 21 const char *psfModel = psMetadataLookupStr(NULL, recipe, "PSF.MODEL"); // Model for PSF22 23 int psfOrder = psMetadataLookupS32(NULL, recipe, "PSF.ORDER"); // Spatial order for PSF 23 24 … … 49 50 50 51 float targetFWHM = psMetadataLookupF32 (&mdok, psphotRecipe, "PSPHOT.STACK.TARGET.PSF.FWHM"); 51 psAssert (isfinite(targetFWHM), "missing psphot recipe value PSPHOT.STACK.TARGET.PSF.FWHM"); 52 if (!mdok) { 53 psVector *fwhmValues = psMetadataLookupVector(&mdok, psphotRecipe, "PSPHOT.STACK.TARGET.PSF.FWHM"); // Magnitude offsets 54 psAssert (mdok, "missing psphot recipe value PSPHOT.STACK.TARGET.PSF.FWHM"); 55 targetFWHM = fwhmValues->data.F32[0]; 56 } 52 57 53 58 float Sxx = sqrt(2.0)*targetFWHM / 2.35; 54 59 55 60 // XXX probably should make the model type (and par 7) optional from recipe 56 psf = pmPSFBuildSimple( "PS_MODEL_PS1_V1", Sxx, Sxx, 0.0, 1.0);61 psf = pmPSFBuildSimple(psfModel, Sxx, Sxx, 0.0, 1.0); 57 62 if (!psf) { 58 63 psError(PSPHOT_ERR_PSF, false, "Unable to build dummy PSF.");
Note:
See TracChangeset
for help on using the changeset viewer.
