IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 2, 2013, 1:53:46 PM (13 years ago)
Author:
eugene
Message:

add test output blocks, commented out

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130307/psastro/src/psastroChipAstrom.c

    r31333 r35341  
    7575                if (refstars == NULL) { continue; }
    7676
     77# if (0)
     78                static int Nchip = 0;
     79                if (1) {
     80                  // XXX test
     81                  char filename[64];
     82                  snprintf (filename, 64, "refstars.%02d.dat", Nchip);
     83                  FILE *outfile = fopen (filename, "w");
     84                  assert (outfile);
     85                  for (int nn = 0; nn < refstars->n; nn++) {
     86                    pmAstromObj *ref = refstars->data[nn];
     87                    fprintf (outfile, "%lf %lf  %lf %lf  %lf %lf  %lf %lf\n",
     88                             ref->sky->r*PS_DEG_RAD, ref->sky->d*PS_DEG_RAD,
     89                             ref->TP->x, ref->TP->y,
     90                             ref->FP->x, ref->FP->y,
     91                             ref->chip->x, ref->chip->y);
     92                  }
     93                  fclose (outfile);
     94                }
     95                if (1) {
     96                  // XXX test
     97                  char filename[64];
     98                  snprintf (filename, 64, "rawstars.%02d.dat", Nchip);
     99                  FILE *outfile = fopen (filename, "w");
     100                  assert (outfile);
     101                  for (int nn = 0; nn < gridrawstars->n; nn++) {
     102                    pmAstromObj *ref = gridrawstars->data[nn];
     103                    fprintf (outfile, "%lf %lf  %lf %lf  %lf %lf  %lf %lf\n",
     104                             ref->sky->r*PS_DEG_RAD, ref->sky->d*PS_DEG_RAD,
     105                             ref->TP->x, ref->TP->y,
     106                             ref->FP->x, ref->FP->y,
     107                             ref->chip->x, ref->chip->y);
     108                  }
     109                  fclose (outfile);
     110                  Nchip ++;
     111                }
     112# endif
     113
    77114                // the absolute minimum number of stars is 4 (for order = 1)
    78115                if ((rawstars->n < 4) || (refstars->n < 4)) {
Note: See TracChangeset for help on using the changeset viewer.