IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 19, 2010, 5:46:13 PM (16 years ago)
Author:
watersc1
Message:

Changes to implement diff_mode in the diffRun table to allow diff.pro to set a more descriptive file name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/difftool.c

    r27007 r27020  
    136136    PXOPT_LOOKUP_STR(data_group, config->args, "-set_data_group", false, false);
    137137    PXOPT_LOOKUP_STR(dist_group, config->args, "-set_dist_group", false, false);
    138     PXOPT_LOOKUP_STR(reduction, config->args, "-rset_eduction", false, false);
     138    PXOPT_LOOKUP_STR(reduction, config->args, "-set_reduction", false, false);
     139    PXOPT_LOOKUP_S16(diff_mode, config->args, "-set_diff_mode", false, false);
    139140    PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false);
    140141
     
    157158            exposure,
    158159            false,
     160            diff_mode,
    159161            note
    160162    );
     
    990992        return false;
    991993    }
    992 
     994    psS16 diff_mode = 0;
     995    if ((input_warp_id != PS_MAX_S64) && (template_warp_id != PS_MAX_S64)) {
     996      diff_mode = 1;
     997    }
     998    else if ((input_warp_id != PS_MAX_S64) && (template_stack_id != PS_MAX_S64)) {
     999      diff_mode = 2;
     1000    }
     1001    else if ((input_stack_id != PS_MAX_S64) && (template_warp_id != PS_MAX_S64)) {
     1002      diff_mode = 3;
     1003    }
     1004    else if ((input_stack_id != PS_MAX_S64) && (template_stack_id != PS_MAX_S64)) {
     1005      diff_mode = 4;
     1006    }
     1007   
     1008   
    9931009    // default
    9941010    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
     
    10091025            false,
    10101026            0,       // magicked
     1027            diff_mode, // diff_mode
    10111028            note
    10121029    );
     
    11141131
    11151132    psArray *list = psArrayAllocEmpty(16); // List of runs, to print
    1116 
     1133    // Populated Run will generate the diff_mode value
    11171134    if (!populatedrun(list, workdir, skycell_id, tess_id, label, data_group ? data_group : label, dist_group, reduction, note,
    11181135                      input_warp_id ? input_warp_id : PS_MAX_S64,
     
    14191436                true,                   // exposure
    14201437                0,       // magicked
     1438                2,       // diff_mode for warp-stack difference
    14211439                note
    14221440        );
     
    17601778        }
    17611779
    1762         diffRunRow *run = diffRunRowAlloc(0, "reg", workdir, label, data_group ? data_group : label, dist_group, reduction, NULL, registered,
    1763                                           tess_id, true, true, false, note); // Run to insert
     1780        diffRunRow *run = diffRunRowAlloc(0,
     1781                                          "reg",
     1782                                          workdir,
     1783                                          label,
     1784                                          data_group ? data_group : label,
     1785                                          dist_group,
     1786                                          reduction,
     1787                                          NULL,  // dvodb
     1788                                          registered,
     1789                                          tess_id,
     1790                                          true,  // bothways
     1791                                          true,  // exposure
     1792                                          false, // magicked
     1793                                          1,     // diff_mode for warp-warp diff
     1794                                          note); // Run to insert
    17641795        if (!diffRunInsertObject(config->dbh, run)) {
    17651796            psError(PS_ERR_UNKNOWN, false, "database error");
     
    20422073                                      false,                 // exposure
    20432074                                      0,       // magicked
     2075                                      4,       // diff_mode
    20442076                                      note
    20452077                                      );
Note: See TracChangeset for help on using the changeset viewer.