IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35419


Ignore:
Timestamp:
Apr 19, 2013, 4:38:18 PM (13 years ago)
Author:
eugene
Message:

minor changes in test blocks

Location:
trunk/psastro/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroChipAstrom.c

    r31333 r35419  
    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)) {
  • trunk/psastro/src/psastroChooseRefstars.c

    r35050 r35419  
    107107
    108108                    if (ref->Mag < clampMagMin) {
    109                         psWarning("Skipping refstar with abusrd magnintude %f ra: %f dec: %f\n",
     109                        psWarning("Skipping refstar with abusrd magnitude %f ra: %f dec: %f\n",
    110110                            ref->Mag, RAD_TO_DEG(ref->sky->r), RAD_TO_DEG(ref->sky->d));
    111111                        goto skip;
     
    131131
    132132# if (0)
    133                 // XXX test
    134                 FILE *outfile = fopen ("refstars.dat", "w");
    135                 assert (outfile);
    136                 for (int nn = 0; nn < refstars->n; nn++) {
    137                           pmAstromObj *ref = refstars->data[nn];
    138                           fprintf (outfile, "%lf %lf\n", ref->sky->r*PS_DEG_RAD, ref->sky->d*PS_DEG_RAD);
     133                if (1) {
     134                  // test output block, not used in normal ops
     135                  char filename[64];
     136                  snprintf (filename, 64, "refstars.%02d.dat", Nchip);
     137                  FILE *outfile = fopen (filename, "w");
     138                  assert (outfile);
     139                  for (int nn = 0; nn < refstars->n; nn++) {
     140                    pmAstromObj *ref = refstars->data[nn];
     141                    fprintf (outfile, "%lf %lf\n", ref->sky->r*PS_DEG_RAD, ref->sky->d*PS_DEG_RAD);
     142                  }
     143                  fclose (outfile);
    139144                }
    140                 fclose (outfile);
     145                if (1) {
     146                  // test output block, not used in normal ops
     147                  char filename[64];
     148                  snprintf (filename, 64, "refstars.%02d.dat", Nchip);
     149                  FILE *outfile = fopen (filename, "w");
     150                  assert (outfile);
     151                  for (int nn = 0; nn < refstars->n; nn++) {
     152                    pmAstromObj *ref = refstars->data[nn];
     153                    fprintf (outfile, "%lf %lf  %lf %lf  %lf %lf\n", ref->sky->r*PS_DEG_RAD, ref->sky->d*PS_DEG_RAD, );
     154                  }
     155                  fclose (outfile);
     156                }
    141157# endif
    142158
Note: See TracChangeset for help on using the changeset viewer.