IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14255


Ignore:
Timestamp:
Jul 16, 2007, 5:37:00 PM (19 years ago)
Author:
jhoblitt
Message:

fix difftool -inputskyfile

Location:
trunk/ippTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/difftool_inputskyfile.sql

    r14254 r14255  
    1 SELECT
    2     diffRun.diff_id,
    3     diffRun.skycell_id,
    4     diffRun.tess_id,
    5     NULL as stack_id,
    6     warpSkyfile.warp_id,
    7     warpSkyfile.uri,
    8     warpSkyfile.path_base,
    9     diffInputSkyfile.template,
    10     rawExp.camera
    11 FROM diffRun
    12 JOIN diffInputSkyfile
    13     USING(diff_id)
    14 JOIN warpSkyfile
    15     ON  diffInputSkyfile.warp_id    = warpSkyfile.warp_id
    16     AND diffInputSkyfile.skycell_id = warpSkyfile.skycell_id
    17     AND diffInputSkyfile.tess_id    = warpSkyfile.tess_id
    18 JOIN warpInputExp
    19     ON diffInputSkyfile.warp_id = warpInputExp.warp_id
    20 JOIN camProcessedExp
    21     ON warpInputExp.cam_id = camProcessedExp.cam_id
    22 JOIN chipRun
    23     ON camProcessedExp.chip_id = chipRun.chip_id
    24 JOIN chipProcessedImfile
    25     ON chipRun.chip_id = chipProcessedImfile.chip_id
    26 JOIN rawExp
    27     ON chipProcessedImfile.exp_id = rawExp.exp_id
    28 WHERE
    29     diffRun.state = 'run'
    30 UNION
    31 SELECT
    32     diffRun.diff_id,
    33     diffRun.skycell_id,
    34     diffRun.tess_id,
    35     stackSumSkyfile.stack_id,
    36     NULL as warp_id,
    37     stackSumSkyfile.uri,
    38     stackSumSkyfile.path_base,
    39     diffInputSkyfile.template,
    40     rawExp.camera
    41 FROM diffRun
    42 JOIN diffInputSkyfile
    43     USING(diff_id)
    44 JOIN stackSumSkyfile
    45     ON  diffInputSkyfile.stack_id = stackSumSkyfile.stack_id
    46 JOIN stackInputSkyfile
    47     ON diffInputSkyfile.stack_id = stackInputSkyfile.stack_id
    48 JOIN warpInputExp
    49     ON stackInputSkyfile.warp_id = warpInputExp.warp_id
    50 JOIN camProcessedExp
    51     ON warpInputExp.cam_id = camProcessedExp.cam_id
    52 JOIN chipRun
    53     ON camProcessedExp.chip_id = chipRun.chip_id
    54 JOIN chipProcessedImfile
    55     ON chipRun.chip_id = chipProcessedImfile.chip_id
    56 JOIN rawExp
    57     ON chipProcessedImfile.exp_id = rawExp.exp_id
    58 WHERE
    59     diffRun.state = 'run'
    60 
     1SELECT * FROM
     2    (SELECT
     3        diffRun.diff_id,
     4        diffRun.skycell_id,
     5        diffRun.tess_id,
     6        NULL as stack_id,
     7        warpSkyfile.warp_id,
     8        warpSkyfile.uri,
     9        warpSkyfile.path_base,
     10        diffInputSkyfile.template,
     11        rawExp.camera
     12    FROM diffRun
     13    JOIN diffInputSkyfile
     14        USING(diff_id)
     15    JOIN warpSkyfile
     16        ON  diffInputSkyfile.warp_id    = warpSkyfile.warp_id
     17        AND diffInputSkyfile.skycell_id = warpSkyfile.skycell_id
     18        AND diffInputSkyfile.tess_id    = warpSkyfile.tess_id
     19    JOIN warpInputExp
     20        ON diffInputSkyfile.warp_id = warpInputExp.warp_id
     21    JOIN camProcessedExp
     22        ON warpInputExp.cam_id = camProcessedExp.cam_id
     23    JOIN chipRun
     24        ON camProcessedExp.chip_id = chipRun.chip_id
     25    JOIN chipProcessedImfile
     26        ON chipRun.chip_id = chipProcessedImfile.chip_id
     27    JOIN rawExp
     28        ON chipProcessedImfile.exp_id = rawExp.exp_id
     29    WHERE
     30        diffRun.state = 'run'
     31    UNION
     32    SELECT
     33        diffRun.diff_id,
     34        diffRun.skycell_id,
     35        diffRun.tess_id,
     36        stackSumSkyfile.stack_id,
     37        NULL as warp_id,
     38        stackSumSkyfile.uri,
     39        stackSumSkyfile.path_base,
     40        diffInputSkyfile.template,
     41        rawExp.camera
     42    FROM diffRun
     43    JOIN diffInputSkyfile
     44        USING(diff_id)
     45    JOIN stackSumSkyfile
     46        ON  diffInputSkyfile.stack_id = stackSumSkyfile.stack_id
     47    JOIN stackInputSkyfile
     48        ON diffInputSkyfile.stack_id = stackInputSkyfile.stack_id
     49    JOIN warpInputExp
     50        ON stackInputSkyfile.warp_id = warpInputExp.warp_id
     51    JOIN camProcessedExp
     52        ON warpInputExp.cam_id = camProcessedExp.cam_id
     53    JOIN chipRun
     54        ON camProcessedExp.chip_id = chipRun.chip_id
     55    JOIN chipProcessedImfile
     56        ON chipRun.chip_id = chipProcessedImfile.chip_id
     57    JOIN rawExp
     58        ON chipProcessedImfile.exp_id = rawExp.exp_id
     59    WHERE
     60        diffRun.state = 'run'
     61    ) as Foo
  • trunk/ippTools/src/difftool.c

    r14250 r14255  
    333333
    334334    if (config->where) {
    335         psString whereClause = psDBGenerateWhereConditionSQL(config->where, "diffInputSkyfile");
    336         psStringAppend(&query, " AND %s", whereClause);
     335        psString whereClause = psDBGenerateWhereSQL(config->where, NULL);
     336        psStringAppend(&query, " %s", whereClause);
    337337        psFree(whereClause);
    338338    }
Note: See TracChangeset for help on using the changeset viewer.