Changeset 6571 for trunk/psphot/src/psphotModelTest.c
- Timestamp:
- Mar 11, 2006, 5:27:13 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotModelTest.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotModelTest.c
r6481 r6571 3 3 static char DEFAULT_MODE[] = "EXT"; 4 4 5 bool psphotModelTest (pmReadout *readout, psMetadata *arguments, psMetadata *recipe) {5 bool psphotModelTest (pmReadout *readout, recipe) { 6 6 7 7 bool status; … … 15 15 16 16 // run model fitting tests on a single source 17 if (!psMetadataLookupBool (&status, arguments, "TEST_FIT")) return false;17 if (!psMetadataLookupBool (&status, recipe, "TEST_FIT")) return false; 18 18 19 19 // what fitting mode to use? 20 char *psfModeWord = psMetadataLookupStr (&status, arguments, "TEST_FIT_MODE");20 char *psfModeWord = psMetadataLookupStr (&status, recipe, "TEST_FIT_MODE"); 21 21 if (!status) { 22 22 psfModeWord = DEFAULT_MODE; … … 33 33 } else { 34 34 // find the model: supplied by user or first in the PSF_MODEL list 35 char *modelName = psMetadataLookupStr (&status, arguments, "TEST_FIT_MODEL");35 char *modelName = psMetadataLookupStr (&status, recipe, "TEST_FIT_MODEL"); 36 36 if (modelName == NULL) { 37 37 // get the list pointers for the PSF_MODEL entries … … 57 57 58 58 // find the fitting parameters (try test values first) 59 float INNER = psMetadataLookupF32 (&status, arguments, "TEST_FIT_INNER_RADIUS");59 float INNER = psMetadataLookupF32 (&status, recipe, "TEST_FIT_INNER_RADIUS"); 60 60 if (!status) { 61 61 INNER = psMetadataLookupF32 (&status, recipe, "SKY_INNER_RADIUS"); 62 62 } 63 63 64 float OUTER = psMetadataLookupF32 (&status, arguments, "TEST_FIT_OUTER_RADIUS");64 float OUTER = psMetadataLookupF32 (&status, recipe, "TEST_FIT_OUTER_RADIUS"); 65 65 if (!status) { 66 66 OUTER = psMetadataLookupF32 (&status, recipe, "SKY_OUTER_RADIUS"); 67 67 } 68 68 69 float RADIUS = psMetadataLookupF32 (&status, arguments, "TEST_FIT_RADIUS");69 float RADIUS = psMetadataLookupF32 (&status, recipe, "TEST_FIT_RADIUS"); 70 70 if (!status) { 71 71 RADIUS = psMetadataLookupF32 (&status, recipe, "PSF_FIT_RADIUS"); 72 72 } 73 73 74 float mRADIUS = psMetadataLookupF32 (&status, arguments, "TEST_MOMENTS_RADIUS");74 float mRADIUS = psMetadataLookupF32 (&status, recipe, "TEST_MOMENTS_RADIUS"); 75 75 if (!status) { 76 76 mRADIUS = psMetadataLookupF32 (&status, recipe, "PSF_MOMENTS_RADIUS"); … … 78 78 79 79 // define the source of interest 80 float xObj = psMetadataLookupF32 (&status, arguments, "TEST_FIT_X");81 float yObj = psMetadataLookupF32 (&status, arguments, "TEST_FIT_Y");80 float xObj = psMetadataLookupF32 (&status, recipe, "TEST_FIT_X"); 81 float yObj = psMetadataLookupF32 (&status, recipe, "TEST_FIT_Y"); 82 82 83 83 // construct the source structures … … 120 120 } 121 121 sprintf (name, "TEST_FIT_PAR%d", i); 122 value = psMetadataLookupF32 (&status, arguments, name);122 value = psMetadataLookupF32 (&status, recipe, name); 123 123 if (status) { 124 124 params[i] = value; … … 154 154 psImageKeepCircle (source->mask, xObj, yObj, RADIUS, "OR", PSPHOT_MASK_MARKED); 155 155 156 char *fitset = psMetadataLookupStr (&status, arguments, "TEST_FIT_SET");156 char *fitset = psMetadataLookupStr (&status, recipe, "TEST_FIT_SET"); 157 157 if (status) { 158 158 status = psphotFitSet (source, model, fitset, psfMode);
Note:
See TracChangeset
for help on using the changeset viewer.
