IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40235


Ignore:
Timestamp:
Dec 3, 2017, 5:56:10 AM (9 years ago)
Author:
eugene
Message:

move RESET for images out of select_images, up to load_images; fix plotting; add test output

Location:
branches/eam_branches/ohana.20170822/src/relphot
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20170822/src/relphot/include/relphot.h

    r40231 r40235  
    407407int           findMosaics         PROTO((Catalog *catalog, int Ncatalog, int doMosaicList));
    408408
     409void checkImages (char *name);
    409410int dumpMags (FILE *fout, Catalog *catalog, int Ncatalog);
    410411
  • branches/eam_branches/ohana.20170822/src/relphot/src/ImageOps.c

    r40213 r40235  
    11591159  return (stats);
    11601160}
     1161
     1162void checkImages (char *name) {
     1163
     1164  off_t i;
     1165  fprintf (stderr, "--- %s ---\n", name);
     1166  for (i = 0; i < Nimage; i++) {
     1167    fprintf (stderr, "%s : 0x%08x : %6.3f  %6.3f\n", image[i].name, image[i].flags, image[i].McalPSF, image[i].McalAPER);
     1168  }
     1169}
  • branches/eam_branches/ohana.20170822/src/relphot/src/load_images.c

    r39642 r40235  
    5252      free (subset);
    5353      subset = image;
     54    }
     55  }
     56
     57  // reset image values as needed.  always allow 'few' images to succeed, if possible (new
     58  // images / detections may have been added
     59  for (off_t i = 0; i < Nsubset; i++) {
     60    if (subset[i].flags & ID_IMAGE_PHOTOM_FEW) {
     61      subset[i].flags &= ~(ID_IMAGE_PHOTOM_FEW | ID_IMAGE_PHOTOM_POOR);
     62    }
     63    if (RESET) {
     64      if (RESET_ZEROPTS) {
     65        if (!KEEP_UBERCAL || !(subset[i].flags & ID_IMAGE_PHOTOM_UBERCAL)) {
     66          subset[i].McalPSF  = 0.0;
     67          subset[i].McalAPER = 0.0;
     68          subset[i].dMcal    = NAN;
     69          subset[i].flags   &= ~ID_IMAGE_PHOTOM_UBERCAL;
     70        }
     71      }
     72      subset[i].flags &= ~ID_IMAGE_PHOTOM_POOR;
     73      subset[i].ubercalDist = 1000;
    5474    }
    5575  }
  • branches/eam_branches/ohana.20170822/src/relphot/src/plotstuff.c

    r39457 r40235  
    179179
    180180  KapaInitGraph (graphdata);
    181   graphdata[0].style = 2;
     181  graphdata[0].style = KAPA_PLOT_POINTS; /* points */
    182182  graphdata[0].ptype = 2;
    183183  graphdata[0].ltype = 0;
  • branches/eam_branches/ohana.20170822/src/relphot/src/relphot_images.c

    r40231 r40235  
    4141  load_images (&db, skylist, &UserPatch, FALSE, USE_ALL_IMAGES);
    4242  MARKTIME("-- load images: %f sec\n", dtime);
     43
     44  checkImages("load images");
    4345
    4446  /* unlock, if we can (else, unlocked below) */
     
    6062    /* add in a loop over the catalogs calling dvo_catalog_chipcoords */
    6163
     64    checkImages("load catalog");
     65
    6266    /* match measurements with images, mosaics */
    6367    initImageBins  (catalog, Ncatalog, TRUE);
     
    7781
    7882    setExclusions (catalog, Ncatalog, TRUE);
     83    checkImages("set Exclu");
    7984
    8085    global_stats (catalog, Ncatalog, flatcorr, 0);
     
    109114      }
    110115      if (VERBOSE2) dumpMags (stderr, catalog, Ncatalog);
     116      checkImages("start loop");
    111117
    112118      setMrel  (catalog, Ncatalog, flatcorr); // threaded
    113119      if (VERBOSE2) dumpMags (stderr, catalog, Ncatalog);
     120      checkImages("set Mrel");
    114121
    115122      if (PLOTSTUFF) {
     
    117124      }
    118125      setMcal  (catalog, FALSE, flatcorr);
     126      checkImages("set Mcal");
    119127      if (VERBOSE2) dumpMags (stderr, catalog, Ncatalog);
    120128
  • branches/eam_branches/ohana.20170822/src/relphot/src/select_images.c

    r40212 r40235  
    251251    image[nimage] = timage[i];
    252252    inSubset[i] = TRUE;
    253     /* always allow 'few' images to succeed, if possible (new images / detections may have
    254      * been added) */
    255     if (image[nimage].flags & ID_IMAGE_PHOTOM_FEW) {
    256       image[nimage].flags &= ~(ID_IMAGE_PHOTOM_FEW | ID_IMAGE_PHOTOM_POOR);
    257     }
    258     if (RESET) {
    259       if (RESET_ZEROPTS) {
    260         if (!KEEP_UBERCAL || !(image[nimage].flags & ID_IMAGE_PHOTOM_UBERCAL)) {
    261           image[nimage].McalPSF  = 0.0;
    262           image[nimage].McalAPER = 0.0;
    263           image[nimage].dMcal    = NAN;
    264           image[nimage].flags   &= ~ID_IMAGE_PHOTOM_UBERCAL;
    265         }
    266       }
    267       image[nimage].flags &= ~ID_IMAGE_PHOTOM_POOR;
    268       image[nimage].ubercalDist = 1000;
    269     }
    270253    line_number[nimage] = i;
    271254    nimage ++;
Note: See TracChangeset for help on using the changeset viewer.