IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 25, 2009, 12:48:19 PM (17 years ago)
Author:
Paul Price
Message:

Adding quality flag to raw, chip, cam, warp, stack, diff product tables. Renaming '-code' flag in the ippTools to '-fault' (clearer meaning, reduces confusion between fault code and quality code).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/ippTools/src/chiptool.c

    r23418 r23532  
    409409    PXOPT_LOOKUP_F32(dtime_script, config->args,   "-dtime_script", false, false);
    410410    PXOPT_LOOKUP_STR(hostname, config->args,       "-hostname", false, false);
    411     PXOPT_LOOKUP_F32(n_stars, config->args,        "-n_stars", false, false);
    412     PXOPT_LOOKUP_F32(n_psfstars, config->args,     "-n_psfstars", false, false);
    413     PXOPT_LOOKUP_F32(n_iqstars, config->args,      "-n_iqstars", false, false);
    414     PXOPT_LOOKUP_F32(n_extended, config->args,     "-n_extended", false, false);
    415     PXOPT_LOOKUP_F32(n_cr, config->args,           "-n_cr", false, false);
    416     PXOPT_LOOKUP_STR(path_base, config->args,      "-path_base", false, false);
    417     PXOPT_LOOKUP_BOOL(magicked, config->args,      "-magicked", false);
     411    PXOPT_LOOKUP_F32(n_stars, config->args,        "-n_stars", false, false);
     412    PXOPT_LOOKUP_F32(n_psfstars, config->args,     "-n_psfstars", false, false);
     413    PXOPT_LOOKUP_F32(n_iqstars, config->args,      "-n_iqstars", false, false);
     414    PXOPT_LOOKUP_F32(n_extended, config->args,     "-n_extended", false, false);
     415    PXOPT_LOOKUP_F32(n_cr, config->args,           "-n_cr", false, false);
     416    PXOPT_LOOKUP_STR(path_base, config->args,      "-path_base", false, false);
     417    PXOPT_LOOKUP_BOOL(magicked, config->args,      "-magicked", false);
    418418
    419419    // default values
    420     PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
     420    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
     421    PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false);
    421422
    422423    if (!psDBTransaction(config->dbh)) {
     
    449450                                   fwhm_minor_uq,
    450451
    451                                    iq_fwhm_major,
    452                                    iq_fwhm_major_err,
    453                                    iq_fwhm_minor,
    454                                    iq_fwhm_minor_err,
    455 
    456                                    iq_m2,
    457                                    iq_m2_err,
    458                                    iq_m2_lq,
    459                                    iq_m2_uq,
    460 
    461                                    iq_m2c,
    462                                    iq_m2c_err,
    463                                    iq_m2c_lq,
    464                                    iq_m2c_uq,
    465 
    466                                    iq_m2s,
    467                                    iq_m2s_err,
    468                                    iq_m2s_lq,
    469                                    iq_m2s_uq,
    470 
    471                                    iq_m3,
    472                                    iq_m3_err,
    473                                    iq_m3_lq,
    474                                    iq_m3_uq,
    475 
    476                                    iq_m4,
    477                                    iq_m4_err,
    478                                    iq_m4_lq,
    479                                    iq_m4_uq,
     452                                   iq_fwhm_major,
     453                                   iq_fwhm_major_err,
     454                                   iq_fwhm_minor,
     455                                   iq_fwhm_minor_err,
     456
     457                                   iq_m2,
     458                                   iq_m2_err,
     459                                   iq_m2_lq,
     460                                   iq_m2_uq,
     461
     462                                   iq_m2c,
     463                                   iq_m2c_err,
     464                                   iq_m2c_lq,
     465                                   iq_m2c_uq,
     466
     467                                   iq_m2s,
     468                                   iq_m2s_err,
     469                                   iq_m2s_lq,
     470                                   iq_m2s_uq,
     471
     472                                   iq_m3,
     473                                   iq_m3_err,
     474                                   iq_m3_lq,
     475                                   iq_m3_uq,
     476
     477                                   iq_m4,
     478                                   iq_m4_err,
     479                                   iq_m4_lq,
     480                                   iq_m4_uq,
    480481
    481482                                   dtime_detrend,
     
    490491                                   n_cr,
    491492                                   path_base,
    492                                    code,
     493                                   fault,
     494                                   quality,
    493495                                   magicked
    494496            )) {
     
    611613    PXOPT_COPY_STR(config->args, where, "-label", "chipRun.label", "LIKE");
    612614    PXOPT_COPY_STR(config->args, where, "-reduction", "chipRun.reduction", "==");
    613     PXOPT_COPY_S16(config->args, where, "-code", "chipProcessedImfile.fault", "==");
     615    PXOPT_COPY_S16(config->args, where, "-fault", "chipProcessedImfile.fault", "==");
     616    PXOPT_COPY_S16(config->args, where, "-quality", "chipProcessedImfile.quality", "==");
    614617
    615618    if (!psListLength(where->list)
     
    652655    PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "==");
    653656    PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "==");
    654     PXOPT_LOOKUP_S16(code, config->args, "-code", true, false);
    655 
    656     if (!pxSetFaultCode(config->dbh, "chipProcessedImfile", where, code)) {
     657    PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false);
     658
     659    if (!pxSetFaultCode(config->dbh, "chipProcessedImfile", where, fault)) {
    657660        psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag");
    658661        return false;
     
    12731276    char sqlFilename[80];
    12741277  } ExportTable;
    1275  
     1278
    12761279  int numExportTables = 3;
    12771280
     
    13531356{
    13541357  unsigned int nFail;
    1355  
     1358
    13561359  int numImportTables = 2;
    1357  
     1360
    13581361  char tables[2] [80] = {"chipImfile", "chipProcessedImfile"};
    13591362
    13601363  PS_ASSERT_PTR_NON_NULL(config, NULL);
    1361  
     1364
    13621365  PXOPT_LOOKUP_STR(infile, config->args, "-infile", true,  false);
    13631366
     
    13791382  // fprintf (stdout, "---- chip run ----\n");
    13801383  // psMetadataPrint (stderr, entry->data.md, 1);
    1381  
     1384
    13821385  for (int i = 0; i < numImportTables; i++) {
    13831386    psMetadataItem *item = psMetadataLookup (input, tables[i]);
    13841387    psAssert (item, "entry not in input?");
    13851388    psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?");
    1386  
     1389
    13871390    switch (i) {
    13881391      case 0:
     
    13981401        }
    13991402        break;
    1400        
     1403
    14011404      case 1:
    14021405        for (int i = 0; i < item->data.list->n; i++) {
Note: See TracChangeset for help on using the changeset viewer.