IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28536 for trunk/ippTools


Ignore:
Timestamp:
Jun 28, 2010, 8:13:53 PM (16 years ago)
Author:
Paul Price
Message:

Merging background restoration branch.

Location:
trunk
Files:
5 edited
4 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/ippTools/share/Makefile.am

    r28486 r28536  
    145145        disttool_definebyquery_camera.sql \
    146146        disttool_definebyquery_chip.sql \
     147        disttool_definebyquery_chip_bg.sql \
    147148        disttool_definebyquery_diff.sql \
    148149        disttool_definebyquery_fake.sql \
     
    150151        disttool_definebyquery_stack.sql \
    151152        disttool_definebyquery_warp.sql \
     153        disttool_definebyquery_warp_bg.sql \
    152154        disttool_definebyquery_SSdiff.sql \
    153155        disttool_defineinterest.sql \
     
    228230        magicdstool_definebyquery_raw.sql \
    229231        magicdstool_definebyquery_chip.sql \
     232        magicdstool_definebyquery_chip_bg.sql \
    230233        magicdstool_definebyquery_camera.sql \
    231234        magicdstool_definebyquery_warp.sql \
     235        magicdstool_definebyquery_warp_bg.sql \
    232236        magicdstool_definebyquery_diff.sql \
    233237        magicdstool_definecopy_chip.sql \
  • trunk/ippTools/src/disttool.c

    r28270 r28536  
    210210            psStringAppend(&query, " AND (chipRun.dist_group = '%s')", dist_group);
    211211        }
     212    } else if (!strcmp(stage, "chip_bg")) {
     213        magicRunType = "chipBackgroundRun";
     214        runJoinStr = "chipBackgroundRun.chip_bg_id";
     215        query = pxDataGet("disttool_definebyquery_chip_bg.sql");
     216        if (!query) {
     217            psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
     218            psFree(where);
     219            return false;
     220        }
     221
     222        if (label) {
     223            psStringAppend(&query, " AND (chipBackgroundRun.label = '%s')", label);
     224        }
     225        if (dist_group) {
     226            psStringAppend(&query, " AND (chipBackgroundRun.dist_group = '%s')", dist_group);
     227        }
    212228    } else if (!strcmp(stage, "camera")) {
    213229        magicRunType = "camRun";    // This is used below to set the magicked business
     
    258274        if (dist_group) {
    259275            psStringAppend(&query, " AND (warpRun.dist_group = '%s')", dist_group);
     276        }
     277
     278    } else if (!strcmp(stage, "warp_bg")) {
     279        magicRunType = "warpBackgroundRun";
     280        runJoinStr = "warpBackgroundRun.warp_bg_id";
     281        query = pxDataGet("disttool_definebyquery_warp_bg.sql");
     282        if (!query) {
     283            psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
     284            psFree(where);
     285            return false;
     286        }
     287
     288        if (label) {
     289            psStringAppend(&query, " AND (warpBackgroundRun.label = '%s')", label);
     290        }
     291        if (dist_group) {
     292            psStringAppend(&query, " AND (warpBackgroundRun.dist_group = '%s')", dist_group);
    260293        }
    261294
  • trunk/ippTools/src/magicdstool.c

    r27786 r28536  
    122122    PXOPT_COPY_S64(config->args, where, "-exp_id",  "exp_id", "==");
    123123    PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "==");
     124    PXOPT_COPY_S64(config->args, where, "-chip_bg_id", "chip_bg_id", "==");
    124125    PXOPT_COPY_S64(config->args, where, "-cam_id",  "cam_id", "==");
    125126    PXOPT_COPY_S64(config->args, where, "-warp_id", "warp_id", "==");
     127    PXOPT_COPY_S64(config->args, where, "-warp_bg_id", "warp_bg_id", "==");
    126128    PXOPT_COPY_S64(config->args, where, "-diff_id", "diff_id", "==");
    127129    PXOPT_COPY_S64(config->args, where, "-magic_id","magicRun.magic_id", "==");
     
    140142        query = pxDataGet("magicdstool_definebyquery_chip.sql");
    141143        break;
     144    case IPP_STAGE_CHIP_BG:
     145        query = pxDataGet("magicdstool_definebyquery_chip_bg.sql");
     146        break;
    142147    case IPP_STAGE_CAMERA:
    143148        query = pxDataGet("magicdstool_definebyquery_camera.sql");
     
    145150    case IPP_STAGE_WARP:
    146151        query = pxDataGet("magicdstool_definebyquery_warp.sql");
     152        break;
     153    case IPP_STAGE_WARP_BG:
     154        query = pxDataGet("magicdstool_definebyquery_warp_bg.sql");
    147155        break;
    148156    case IPP_STAGE_DIFF:
     
    720728        query = "UPDATE chipProcessedImfile SET magicked = %" PRId64 " where chip_id = %" PRId64 " AND class_id = '%s'";
    721729        break;
     730    case IPP_STAGE_CHIP_BG:
     731        query = "UPDATE chipBackgroundImfile SET magicked = %" PRId64 " where chip_bg_id = %" PRId64 " AND class_id = '%s'";
     732        break;
    722733    case IPP_STAGE_CAMERA:
    723734        // no there is no magicked column in camProcessedExp so we have nothing to do
     
    727738        query = "UPDATE warpSkyfile SET magicked = %" PRId64 " where warp_id = %" PRId64 " AND skycell_id = '%s'";
    728739        break;
     740    case IPP_STAGE_WARP_BG:
     741        query = "UPDATE warpBackgroundSkyfile SET magicked = %" PRId64 " where warp_bg_id = %" PRId64 " AND skycell_id = '%s'";
     742        break;
    729743    case IPP_STAGE_DIFF:
    730744        query = "UPDATE diffSkyfile SET magicked = %" PRId64 " where diff_id = %" PRId64 " AND skycell_id = '%s'";
     
    794808        query = "UPDATE chipRun SET magicked = %" PRId64 " where chip_id = %" PRId64;
    795809        break;
     810    case IPP_STAGE_CHIP_BG:
     811        query = "UPDATE chipBackgroundRun SET magicked = %" PRId64 " where chip_bg_id = %" PRId64;
     812        break;
    796813    case IPP_STAGE_CAMERA:
    797814        query = "UPDATE camRun SET magicked = %" PRId64 " where cam_id = %" PRId64;
     
    799816    case IPP_STAGE_WARP:
    800817        query = "UPDATE warpRun SET magicked = %" PRId64 " where warp_id = %" PRId64;
     818        break;
     819    case IPP_STAGE_WARP_BG:
     820        query = "UPDATE warpBackgroundRun SET magicked = %" PRId64 " where warp_bg_id = %" PRId64;
    801821        break;
    802822    case IPP_STAGE_DIFF:
  • trunk/ippTools/src/magicdstoolConfig.c

    r27452 r28536  
    6060    psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-exp_id",   0, "search by exp_id", 0);
    6161    psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-chip_id",  0, "search by chip_id", 0);
     62    psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-chip_bg_id",  0, "search by chip_bg_id", 0);
    6263    psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-cam_id",  0, "search by cam_id", 0);
    6364    psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-warp_id",  0, "search by warp_id", 0);
     65    psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-warp_bg_id",  0, "search by warp_bg_id", 0);
    6466    psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-diff_id",  0, "search by diff_id", 0);
    6567    psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-magic_id", 0, "search by magic_id", 0);
Note: See TracChangeset for help on using the changeset viewer.