IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 26, 2012, 11:46:01 AM (14 years ago)
Author:
eugene
Message:

updates for pedantic gcc, mods to relphot average mags to handle GPC1 stacks

Location:
trunk/Ohana/src/relphot/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relphot/src/GridOps.c

    r33963 r34088  
    423423        Merr =  MAX (catalog[c].measureT[m].dM, MIN_ERROR);
    424424
    425         // Wsys = 1.0 / SQ(Merr);
    426         Wsys = 1.0;
     425        // disable Wsys for now
     426        Wsys = TRUE ? 1.0 : 1.0 / SQ(Merr);
    427427
    428428        Ng = gridmeas[c][m];
     
    684684  off_t i, Nimage;
    685685  int j, Nbytes, Nformat;
    686   off_t *imlist;
    687686  FILE *f;
    688687  Header header, theader;
     
    697696
    698697  /* select reference mosaic image */
    699   imlist = SelectRefMosaic (&refmosaic, &Nimage);
     698  // off_t *imlist = SelectRefMosaic (&refmosaic, &Nimage); return value ignored
     699  SelectRefMosaic (&refmosaic, &Nimage);
    700700
    701701  /* we are writing to this file */
  • trunk/Ohana/src/relphot/src/MosaicOps.c

    r33963 r34088  
    762762int setMmos_mosaic (Mosaic *myMosaic, off_t Nmos, Image *image, Catalog *catalog, SetMmosInfo *info, FlatCorrectionTable *flatcorr) {
    763763
    764   Image *imageReal;
    765764  off_t j, NimageReal;
    766765
     
    776775  assert (Nmos < Nmosaic);
    777776
    778   imageReal = getimages (&NimageReal, NULL);
     777  // Image *imageReal = getimages (&NimageReal, NULL); returned pointer is not used
     778  getimages (&NimageReal, NULL);
    779779
    780780  /* on PoorImages run, skip good images */
     
    15001500  off_t i, j, m, c, N, ave, Nimage;
    15011501  double *xlist, *ylist;
    1502   double Xmin, Xmax, Ymin, Ymax;
     1502  // double Xmin, Xmax, Ymin, Ymax;
    15031503  char string[64];
    1504   Image *image;
    15051504  Graphdata graphdata;
    15061505
    15071506  if (!MOSAIC_ZEROPT) return;
    15081507
    1509   image = getimages (&Nimage, NULL);
     1508  // Image *image = getimages (&Nimage, NULL); returned value ignored
     1509  getimages (&Nimage, NULL);
    15101510
    15111511  N = 0;
    1512   for (i = 0; i < Nmosaic; i++)
     1512  for (i = 0; i < Nmosaic; i++) {
    15131513    N = MAX (N, N_onMosaic[i]);
     1514  }
    15141515
    15151516  ALLOCATE (xlist, double, N);
     
    15181519  for (i = 0; i < Nmosaic; i++) {
    15191520    N = 0;
    1520     Xmin = Ymin = +360.0;
    1521     Xmax = Ymax = -360.0;
     1521    // Xmin = Ymin = +360.0;
     1522    // Xmax = Ymax = -360.0;
    15221523    for (j = 0; j < N_onMosaic[i]; j++) {
    15231524     
  • trunk/Ohana/src/relphot/src/StarOps.c

    r33963 r34088  
    354354      int Next = 0;
    355355      int haveSynth = FALSE;
     356      int haveStack = FALSE;
    356357
    357358      int forceSynth = FALSE;
     
    413414            }
    414415          }
     416          // gpc1 stack data
     417          if ((catalog[Nc].measure[m].photcode >= 11000) && (catalog[Nc].measure[m].photcode <= 11400)) {
     418            if (pass < 2) continue;
     419            haveStack = TRUE;
     420          }
     421
    415422          // count extended detections for 2MASS (XXX NOTE hardwired photcodes 2011, 2012, 2013)
    416423          if ((catalog[Nc].measure[m].photcode >= 2011) && (catalog[Nc].measure[m].photcode <= 2013)) {
     
    477484        // up-weight the ubercal values (or convergence can take a long time...)
    478485        if (catalog[Nc].measureT[m].dbFlags & ID_MEAS_PHOTOM_UBERCAL) {
     486          haveUbercal = TRUE;
    479487          wlist[N] = 10.0;
    480488        }
     
    492500
    493501      int Nminmeas = isSetMrelFinal ? 1 : STAR_TOOFEW + 1;
     502
     503      if (haveStack && (N > 1)) {
     504        // fprintf (stderr, "multiple stack values for %10.6f %10.6f\n", catalog[Nc].averageT[j].R, catalog[Nc].averageT[j].D);
     505      }
    494506
    495507      // when performing the grid analysis, STAR_TOOFEW should be set to 1;
     
    11061118  off_t j, N;
    11071119  double *xlist, *ylist;
    1108   double Xmin, Ymin, Xmax, Ymax;
     1120  // double Xmin, Ymin, Xmax, Ymax;
    11091121  Graphdata graphdata;
    11101122
     
    11171129
    11181130  N = 0;
    1119   Xmin = Ymin = +360.0;
    1120   Xmax = Ymax = -360.0;
     1131  // Xmin = Ymin = +360.0;
     1132  // Xmax = Ymax = -360.0;
    11211133  for (i = 0; i < Ncatalog; i++) {
    11221134    for (j = 0; j < catalog[i].Naverage; j++) {
  • trunk/Ohana/src/relphot/src/reload_catalogs.c

    r33963 r34088  
    9494      catalog.catformat = dvo_catalog_catformat (UPDATE_CATFORMAT);
    9595    }
     96
     97    struct timeval now;
     98    gettimeofday (&now, (void *) NULL);
     99    char *moddate = ohana_sec_to_date (now.tv_sec);
     100    gfits_modify (&catalog.header, "RELPHOT", "%s", 1, moddate);     
     101    free (moddate);
     102
    96103    dvo_catalog_save (&catalog, VERBOSE);
    97104    dvo_catalog_unlock (&catalog);
  • trunk/Ohana/src/relphot/src/select_images.c

    r33963 r34088  
    256256    }
    257257    if (RESET) {
    258       if (!KEEP_UBERCAL) {
     258      if (!KEEP_UBERCAL || !(image[nimage].flags & ID_IMAGE_PHOTOM_UBERCAL)) {
    259259        image[nimage].Mcal = 0.0;
    260260        image[nimage].dMcal = NAN;
     
    296296
    297297  double theta1, theta2;
    298   double Theta1, Theta2;
    299298
    300299  theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]);
     
    309308  }
    310309
    311   Theta1 = theta1;
    312   Theta2 = theta2;
    313310  theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]);
    314311  theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]);
  • trunk/Ohana/src/relphot/src/setMrelFinal.c

    r33963 r34088  
    166166
    167167  /* allow measures from images marked POOR and FEW */
    168   if (pass >= 2) IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL;
     168  if (pass >= 3) IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL;
    169169 
    170170  /* allow measures marked as outliers (POOR) and off image region (AREA) */
    171   if (pass >= 2) {
     171  if (pass >= 3) {
    172172    MEAS_BAD = ID_MEAS_NOCAL | ID_MEAS_SKIP_PHOTOM;
    173173  } else {
     
    233233        }
    234234
    235         // PASS 3 : accept bad measurements (eg, SAT, CR)
     235        // PASS 3 : accept bad measurements (eg, SAT, CR), internal outliers
    236236        if (pass < 3) {
    237237          if (catalog[0].measure[m].photFlags & code->photomBadMask) goto skip;
     
    241241        }
    242242       
    243         // PASS 2 : internal outliers accepted
     243        // PASS 2 : accept stack measurements
    244244
    245245        // PASS 1 : accept poor measurements as well (eg, POOR FIT, etc)
Note: See TracChangeset for help on using the changeset viewer.