IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34779


Ignore:
Timestamp:
Dec 7, 2012, 12:28:26 PM (14 years ago)
Author:
Serge CHASTEL
Message:

Merge tag into trunk

Location:
trunk/ppTranslate/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppTranslate/src/ppMopsRead.c

    r34676 r34779  
    2828  for (int i = 0; i < num; i++) {
    2929    const char *name = inNames->data[i];
    30     printf("%s\n", name);
     30    printf("Input filename:\n%s\n", name);
    3131
    3232    psFits *fits = psFitsOpen(name,  "r"); // FITS file
     
    8484    }
    8585    ppMopsDetections *det = ppMopsDetectionsAlloc(size);
     86    det->platescale = NAN;
    8687    detections->data[i] = det;
    8788    det->component = psStringNCopy(name, strrchr(name, '.') - name); // Strip off extension
     
    280281      if (isfinite(scale)) {
    281282          det->platescale = scale;
     283          //printf("platescale = %g\n", scale);
    282284      }
    283285      numGood++;
     
    306308    }
    307309
     310    printf("Detection platescale = %g\n", det->platescale);
    308311    psTrace("ppMops.read", 2, "Read %ld good rows from %s\n", numGood, (const char*)name);
    309312  }
  • trunk/ppTranslate/src/ppMopsWrite.c

    r34675 r34779  
    5151  float seeing = 0.;
    5252  int totalGood = 0;
     53  int platescale_has_been_set = 0;
    5354  for (int d = 0; d < detections->n; d++) {
    5455    if ( (detections->data[d] != NULL) && (isfinite(((ppMopsDetections*) detections->data[d])->seeing)) ) {
     
    5657      totalGood += 1;
    5758      if (isfinite(((ppMopsDetections*) detections->data[d])->platescale)) {
     59          if (platescale_has_been_set == 0) {
    5860          det->platescale = ((ppMopsDetections*) detections->data[d])->platescale;
    59       }
    60     }
    61   }
    62   printf("plate-scale = [%g]\n", det->platescale);
     61              platescale_has_been_set = 1;
     62          } else {
     63              if (det->platescale != ((ppMopsDetections*) detections->data[d])->platescale) {
     64                  printf("Different values for platescale: %g - %g in detection %d\n",
     65                         det->platescale,
     66                         ((ppMopsDetections*) detections->data[d])->platescale,
     67                         d);
     68      }
     69    }
     70  }
     71    }
     72  }
     73  //printf("plate-scale = [%g]\n", det->platescale);
    6374  seeing /= (float) totalGood;
    6475  if (det != NULL) {
Note: See TracChangeset for help on using the changeset viewer.