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/psphot-utils.c

    r4375 r4398  
    5252    fclose (f);
    5353    return true;
     54}
     55
     56bool DumpPSFTestData (pmPSF_Test *test, char *filename)
     57{
     58
     59  FILE *f = fopen (key, "w");
     60
     61  for (int j = 0; j < test->sources->n; j++) {
     62
     63    psSource *source = test->sources->data[j];
     64    psModel  *model  = test->modelPSF->data[j];     
     65
     66    float sky = 0;
     67    if (model != NULL) sky = model->params->data.F32[0];
     68
     69    fprintf (f, "%3d %6.1f %6.1f  %7.4f %7.4f  %8.4f\n",
     70             j, source->moments->x, source->moments->y,
     71             test->metric->data.F64[j], test->fitMag->data.F64[j], sky);
     72  }
     73  fclose (f);
    5474}
    5575
Note: See TracChangeset for help on using the changeset viewer.