Changeset 5672 for trunk/psphot/src/psphotTest.c
- Timestamp:
- Dec 4, 2005, 5:33:32 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotTest.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotTest.c
r5654 r5672 3 3 int main (int argc, char **argv) { 4 4 5 psSparseMatrixTest ();5 bool status; 6 6 7 psMetadata *config = psphotTestArguments (&argc, argv); 8 eamReadout *imdata = psphotSetup (config); 9 10 int x = psMetadataLookupF32 (&status, config, "TEST_FIT_X"); 11 int y = psMetadataLookupF32 (&status, config, "TEST_FIT_Y"); 12 float fraction = psMetadataLookupF32 (&status, config, "TEST_FRACTION"); 13 float threshold = psMetadataLookupF32 (&status, config, "TEST_THRESHOLD"); 14 15 if (threshold == -1) { 16 threshold = fraction * imdata->image->data.F32[y][x]; 17 } 18 19 psArray *contour = pmSourceContour_EAM (imdata->image, x, y, threshold); 20 if (contour == NULL) { 21 fprintf (stderr, "error: invalid contour\n"); 22 exit (1); 23 } 24 25 psVector *xV = contour->data[0]; 26 psVector *yV = contour->data[1]; 27 28 for (int i = 0; i < xV->n; i++) { 29 fprintf (stdout, "%d %f %f\n", i, xV->data.F32[i], yV->data.F32[i]); 30 } 31 32 // psSparseMatrixTest (); 33 exit (0); 7 34 }
Note:
See TracChangeset
for help on using the changeset viewer.
