IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27020


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.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/dbconfig/changes.txt

    r26904 r27020  
    15121512
    15131513-- Version 1.1.64
     1514
     1515ALTER TABLE diffRun ADD COLUMN diff_mode SMALLINT NOT NULL AFTER magicked;
     1516
     1517UPDATE dbversion set schema_version = '1.1.64', updated= CURRENT_TIMESTAMP();
     1518
     1519-- Version 1.1.65
     1520
  • trunk/dbconfig/diff.md

    r25835 r27020  
    1515    exposure    BOOL        f
    1616    magicked    S64         0
     17    diff_mode   S16         0
    1718    note        STR         255
    1819END
  • trunk/ippTasks/diff.pro

    r27005 r27020  
    182182    book getword diffSkyfile $pageName dbname -var DBNAME
    183183    book getword diffSkyfile $pageName reduction -var REDUCTION
     184    book getword diffSkyfile $pageName diff_mode -var DIFF_MODE
    184185
    185186    # set the host and workdir based on the skycell hash
     
    191192    # $WORKDIR = $WORKDIR_TEMPLATE
    192193
     194    if ($DIFF_MODE == 2)
     195        $DIFF_TAG = "WS."
     196    else if ($DIFF_MODE == 3)
     197        $DIFF_TAG = "SW."
     198    else if ($DIFF_MODE == 4)
     199        $DIFF_TAG = "SS."
     200    else
     201# if (($DIFF_MODE == 1)||("$DIFF_MODE" == "NULL"))
     202        $DIFF_TAG = ""
     203    end
     204
    193205    basename $TESS_DIR -var TESS_ID
    194     sprintf outroot "%s/%s/%s/%s.%s.dif.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $DIFF_ID
     206    sprintf outroot "%s/%s/%s/%s.%s.%sdif.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $DIFF_TAG $DIFF_ID
    195207
    196208    stdout $LOGDIR/diff.skycell.log
  • trunk/ippTools/share/difftool_todiffskyfile.sql

    r26886 r27020  
    1111    diffRun.state,
    1212    diffRun.reduction,
    13     diffRun.bothways
     13    diffRun.bothways,
     14    diffRun.diff_mode
    1415FROM diffRun
    1516JOIN diffInputSkyfile USING(diff_id)
  • 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                                      );
  • trunk/ippTools/src/difftoolConfig.c

    r26984 r27020  
    5656    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-set_data_group",  0,     "define data group", NULL);
    5757    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-set_dist_group",  0,     "define dist group", NULL);
     58    psMetadataAddS16(definerunArgs, PS_LIST_TAIL, "-set_diff_mode", 0,       "specify type of difference (WW=1,WS=2,SW=3,SS=4)", 0);
    5859    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-set_note",  0,           "define note", NULL);
    5960    psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-simple",  0,            "use the simple output format", false);
     
    6869    psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_data_group", 0,   "define new data_group", NULL);
    6970    psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_dist_group", 0,   "define new dist_group", NULL);
     71    psMetadataAddS16(updaterunArgs, PS_LIST_TAIL, "-set_diff_mode", 0,       "specify type of difference (WW=1,WS=2,SW=3,SS=4)", 0);
    7072    psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_note", 0,         "define new note", NULL);
    7173
Note: See TracChangeset for help on using the changeset viewer.