IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38588


Ignore:
Timestamp:
Jul 15, 2015, 10:44:35 AM (11 years ago)
Author:
eugene
Message:

fix typo in EXPNAME_AS_INT; fix segfault in TaskOps.c; set cvec correctly; fix typos in dvo table fits fields; watch out for compression in delete images; skip galphot in dvomerge (why is this needed?); inherit compression and format from output file if it exists; use strextend; add -update-catcompress to dvomerge_client command

Location:
branches/eam_branches/ipp-20150625/Ohana/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150625/Ohana/src/dvomerge/src/LoadCatalog.c

    r38471 r38588  
    99
    1010  // always load all of the data (if any exists)
    11   catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR | DVO_LOAD_GALPHOT;
     11  // XXXX TEMP HACK : skip GALPHOT
     12  // XXXX catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR | DVO_LOAD_GALPHOT;
     13  catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR;
    1214 
    1315  catalog[0].catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
  • branches/eam_branches/ipp-20150625/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c

    r38470 r38588  
    177177      LoadCatalog (&outcatalog, outlist[0].regions[j], outcatalog.filename, "w", NsecfiltOutput);
    178178
    179       // if no catalog already exists, use the input catalog to define the format or the specified format
    180179      if (UPDATE_CATFORMAT) {
    181180        outcatalog.catformat = dvo_catalog_catformat (UPDATE_CATFORMAT);
    182181      } else {
    183         outcatalog.catformat = incatalog.catformat;
    184       }
     182        // IF no catalog already exists, use the input catalog to define the format
     183        if (outcatalog.Naverage_disk == 0) {
     184          outcatalog.catformat = incatalog.catformat;
     185        }
     186      }
     187
    185188      if (UPDATE_CATCOMPRESS) {
    186189        outcatalog.catcompress = dvo_catalog_catcompress (UPDATE_CATCOMPRESS);
    187190      } else {
    188         outcatalog.catcompress = incatalog.catcompress;
     191        // IF no catalog already exists, use the input catalog to define the compression
     192        if (outcatalog.Naverage_disk == 0) {
     193          outcatalog.catcompress = incatalog.catcompress;
     194        }
    189195      }
    190196
     
    282288
    283289    // options / arguments that can affect relastro_client -update-objects:
    284     char command[DVO_MAX_PATH];
    285     snprintf (command, DVO_MAX_PATH, "dvomerge_client %s into %s -hostID %d -hostdir %s -region %f %f %f %f -D ADDSTAR_RADIUS %f",
    286               absinput, absoutput, group->hosts[i][0].hostID, group->hosts[i][0].pathname,
    287               UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, RADIUS
    288       );
    289 
    290     char tmpline[DVO_MAX_PATH];
    291     if (VERBOSE)             { snprintf (tmpline, DVO_MAX_PATH, "%s -v",                command); strcpy (command, tmpline); }
    292     if (VERIFY)              { snprintf (tmpline, DVO_MAX_PATH, "%s -verify",           command); strcpy (command, tmpline); }
    293     if (VERIFY_CATALOG_ONLY) { snprintf (tmpline, DVO_MAX_PATH, "%s -verify-catalogs",  command); strcpy (command, tmpline); }
    294     if (REPLACE_BY_PHOTCODE) { snprintf (tmpline, DVO_MAX_PATH, "%s -replace",          command); strcpy (command, tmpline); }
    295     if (REPLACE_TYCHO)       { snprintf (tmpline, DVO_MAX_PATH, "%s -replace-tycho",    command); strcpy (command, tmpline); }
    296     if (PARALLEL_INPUT)      { snprintf (tmpline, DVO_MAX_PATH, "%s -parallel-input",   command); strcpy (command, tmpline); }
    297     if (FORCE_MERGE)         { snprintf (tmpline, DVO_MAX_PATH, "%s -force-merge",      command); strcpy (command, tmpline); }
    298     if (MATCHED_TABLES)      { snprintf (tmpline, DVO_MAX_PATH, "%s -matched-tables",   command); strcpy (command, tmpline); }
    299     if (UPDATE_CATFORMAT)    { snprintf (tmpline, DVO_MAX_PATH, "%s -update-catformat %s", command, UPDATE_CATFORMAT); strcpy (command, tmpline); }
     290    char *command = NULL;
     291    strextend (&command, "dvomerge_client %s into %s -hostID %d -hostdir %s -region %f %f %f %f -D ADDSTAR_RADIUS %f",
     292               absinput, absoutput, group->hosts[i][0].hostID, group->hosts[i][0].pathname,
     293               UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, RADIUS);
     294
     295    if (VERBOSE)             { strextend (&command, "-v"); }
     296    if (VERIFY)              { strextend (&command, "-verify"); }
     297    if (VERIFY_CATALOG_ONLY) { strextend (&command, "-verify-catalogs"); }
     298    if (REPLACE_BY_PHOTCODE) { strextend (&command, "-replace"); }
     299    if (REPLACE_TYCHO)       { strextend (&command, "-replace-tycho"); }
     300    if (PARALLEL_INPUT)      { strextend (&command, "-parallel-input"); }
     301    if (FORCE_MERGE)         { strextend (&command, "-force-merge"); }
     302    if (MATCHED_TABLES)      { strextend (&command, "-matched-tables"); }
     303    if (UPDATE_CATFORMAT)    { strextend (&command, "-update-catformat %s", UPDATE_CATFORMAT); }
     304    if (UPDATE_CATCOMPRESS)  { strextend (&command, "-update-catcompress %s", UPDATE_CATCOMPRESS); }
    300305
    301306    // add some config variables:
    302     snprintf (tmpline, DVO_MAX_PATH, "%s -D CATMODE %s",    command, CATMODE);   strcpy (command, tmpline);
    303     snprintf (tmpline, DVO_MAX_PATH, "%s -D CATFORMAT %s",  command, CATFORMAT); strcpy (command, tmpline);
    304     snprintf (tmpline, DVO_MAX_PATH, "%s -D SKY_DEPTH %d",  command, SKY_DEPTH); strcpy (command, tmpline);
     307    strextend (&command, "-D CATMODE %s", CATMODE);
     308    strextend (&command, "-D CATFORMAT %s", CATFORMAT);
     309    strextend (&command, "-D SKY_DEPTH %d", SKY_DEPTH);
    305310
    306311    fprintf (stderr, "command: %s\n", command);
  • branches/eam_branches/ipp-20150625/Ohana/src/dvomerge/src/dvorepairDeleteImagesByExternID.c

    r38468 r38588  
    279279        gfits_scan(&cpmHeaderTBL, "NAXIS1", "%d", 1, &NbytesPerRow);
    280280
    281         myAbort ("fix compression");
     281        char compressMode[256];
     282        if (gfits_scan (&cpmHeaderTBL, "DVO_CMP", "%s", 1, compressMode)) {
     283          if (strcmp (compressMode, "NONE")) {
     284            myAbort ("fix compression");
     285          }
     286        }
    282287
    283288        // this function can only handle PS1_V5 and later formats
     
    661666  gfits_scan (&cptHeaderPHU, "NSECFILT",     "%d",      1,  &Nsecfilt);
    662667
    663   myAbort ("test for compression");
     668  if (0) {
     669    char compressMode[256];
     670    if (gfits_scan (&cptHeaderTBL, "DVO_CMP", "%s", 1, compressMode)) {
     671      if (strcmp (compressMode, "NONE")) {
     672        myAbort ("fix compression");
     673      }
     674    }
     675  }
    664676
    665677  /* convert internal to external format */
  • branches/eam_branches/ipp-20150625/Ohana/src/libautocode/def/average-ps1-v5.d

    r38441 r38588  
    2626FIELD ChiSqAve,       CHISQ_POS,   float,           astrometry analysis chisq
    2727FIELD ChiSqPM,        CHISQ_PM,    float,           astrometry analysis chisq
    28 FIELD ChiSqPar,       CHISQ_PAP,   float,           astrometry analysis chisq
     28FIELD ChiSqPar,       CHISQ_PLX,   float,           astrometry analysis chisq
    2929FIELD Tmean,          MEAN_EPOCH,  int,             mean epoch (PM,PAR ref),       unix time seconds
    3030FIELD Trange,         TIME_RANGE,  int,             mean epoch (PM,PAR ref),       unix time seconds
     
    4141FIELD Nlensing,       NLENSING,    unsigned short,  number of lensing measurements
    4242FIELD Nlensobj,       NLENSOBJ,    unsigned short,  number of lensing measurements
    43 FIELD Ngalphot,      NGALPHOT,   unsigned short,  number of galphot measurements
     43FIELD Ngalphot,       NGALPHOT,    unsigned short,  number of galphot measurements
    4444
    4545FIELD measureOffset,  OFF_MEASURE,  int,            offset to first psf measurement
     
    4848FIELD lensobjOffset,  OFF_LENSOBJ,  int,            offset to mean lensing data
    4949FIELD starparOffset,  OFF_STARPAR,  int,            offset to stellar parameter data
    50 FIELD galphotOffset, OFF_GALPHOT, int,              offset to galphot object entry
     50FIELD galphotOffset,  OFF_GALPHOT, int,             offset to galphot object entry
    5151
    5252FIELD refColorBlue,   REF_COLOR_BLUE, float,        color of astrometry ref stars
     
    5757FIELD projectionID,   PROJECTION_ID, short,         ID of projection for primary skycell
    5858
    59 FIELD Nstarpar,       DUMMY,         short,         number of stellar parameter entries
     59FIELD Nstarpar,       N_STAR_PAR,    short,         number of stellar parameter entries
    6060FIELD dummy,          DUMMY,         short,         unassigned bytes
    6161
  • branches/eam_branches/ipp-20150625/Ohana/src/libautocode/def/measure-ps1-v5.d

    r38062 r38588  
    7070FIELD psfNdof,        PSF_NDOF,      int,            psf degrees of freedom
    7171FIELD psfNpix,        PSF_NPIX,      int,            psf number of pixels
    72 FIELD photFlags2,     PHOT_FLAGS,    int,            flags supplied by photometry program
     72FIELD photFlags2,     PHOT_FLAGS2,   int,            flags supplied by photometry program
    7373FIELD extNsigma,      EXT_NSIGMA,    float,          Nsigma deviation towards EXT
    7474
  • branches/eam_branches/ipp-20150625/Ohana/src/libautocode/def/secfilt-ps1-v5.d

    r37246 r38588  
    1010FIELD  Map,           MAG_AP,            float,    ave aperture mag in this band,         mags
    1111FIELD  dMap,          MAG_AP_ERR,        float,    ave aperture mag in this band,         mags
    12 FIELD  sMap,          MAG_AP_STDEV,    float,      standard deviation of ap mags,         mags
     12FIELD  sMap,          MAG_AP_STDEV,      float,      standard deviation of ap mags,         mags
    1313FIELD  Mkron,         MAG_KRON,          float,    ave kron mag in this band,             mags
    1414FIELD  dMkron,        MAG_KRON_ERR,      float,    formal error on average kron mag,      mags
    15 FIELD  sMkron,        MAG_KRON_STDEV,  float,      standard deviation of kron mags,       mags
     15FIELD  sMkron,        MAG_KRON_STDEV,    float,      standard deviation of kron mags,       mags
    1616                                         
    1717# XXX I could add these fields to secfilt or calculate in dvopsps?
  • branches/eam_branches/ipp-20150625/Ohana/src/libdvo/src/dbExtractImages.c

    r38581 r38588  
    236236    case IMAGE_EXPNAME_AS_INT:
    237237      // XXX NOTE this does not handle gpc2 images
    238       if ((image[N].name[0] == 'o') && (image->name[5] == 'g') && (image->name[10] == 'o')) {
    239         int mjd  = atoi(&image->name[1]);
    240         int Nexp = atoi(&image->name[6]);
     238      if ((image[N].name[0] == 'o') && (image[N].name[5] == 'g') && (image[N].name[10] == 'o')) {
     239        int mjd  = atoi(&image[N].name[1]);
     240        int Nexp = atoi(&image[N].name[6]);
    241241        value.Int = mjd * 10000 + Nexp;
    242242      }
  • branches/eam_branches/ipp-20150625/Ohana/src/opihi

  • branches/eam_branches/ipp-20150625/Ohana/src/opihi/cmd.data/uniq.c

    r38579 r38588  
    9393  // free up extra memory
    9494  ResetVector (ovec, ivec->type, Nnew);
    95   if (cvec) ResetVector (ovec, OPIHI_INT, Nnew);
     95  if (cvec) ResetVector (cvec, OPIHI_INT, Nnew);
    9696
    9797  return (TRUE);
  • branches/eam_branches/ipp-20150625/Ohana/src/opihi/pantasks/TaskOps.c

    r36623 r38588  
    2222void FreeTasks () {
    2323  int i;
    24   for (i = 0; i < Ntasks; i++) {
     24  int ntasks = Ntasks;
     25  Ntasks = 0;
     26  for (i = 0; i < ntasks; i++) {
    2527    FreeTask (tasks[i]);
    2628  }
Note: See TracChangeset for help on using the changeset viewer.