IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 25, 2005, 9:23:18 AM (21 years ago)
Author:
eugene
Message:

further cleanup, adding output functions

File:
1 edited

Legend:

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

    r4375 r4398  
    77    bool        status;
    88    char       *modelName;
    9     char        key[64];
     9    char        key[64], filename[64];
    1010    pmPSF_Test *test  = NULL;
    1111    psArray    *stars = NULL;
     
    3535        tests->data[i] = pmPSF_TestModel (stars, modelName, RADIUS);
    3636
    37         // dump psf test data to file:
    38         {
    39           sprintf (key, "metric.%d.dat", i);
    40           FILE *f = fopen (key, "w");
    41           test = tests->data[i];
    42 
    43 
    44           for (int j = 0; j < test->sources->n; j++) {
    45             psSource *source = test->sources->data[j];
    46             psModel  *model  = test->modelPSF->data[j];     
    47             float sky = 0;
    48 
    49             if (model != NULL) sky = model->params->data.F32[0];
    50 
    51             fprintf (f, "%3d %6.1f %6.1f  %7.4f %7.4f  %8.4f\n",
    52                      j, source->moments->x, source->moments->y,
    53                      test->metric->data.F64[j], test->fitMag->data.F64[j], sky);
    54           }
    55           fclose (f);
    56         }
     37        sprintf (filename, "metric.%d.dat", i);
     38        DumpPSFTestData (tests->data[i], filename);
    5739    }
    5840
Note: See TracChangeset for help on using the changeset viewer.