IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 4, 2005, 5:33:32 AM (21 years ago)
Author:
eugene
Message:

simultaneous PSF fitting, better background, basic deblending

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotTest.c

    r5654 r5672  
    33int main (int argc, char **argv) {
    44
    5   psSparseMatrixTest ();
     5    bool status;
    66
     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);
    734}
Note: See TracChangeset for help on using the changeset viewer.