IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 2, 2009, 11:55:52 AM (17 years ago)
Author:
Paul Price
Message:

Removing warpSkyfile.ignored from database, in favour of using the quality flags. This means that we can ignore skycells on the basis of usefulness (whether we can measure the PSF) rather than an arbitrary cut of 10% lit pixels (which pixels may or may not be useful).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/ippTools/share/difftool_definebyquery_part2.sql

    r21308 r23677  
    11-- insert skycells to diff
    22INSERT INTO skycellsToDiff
     3SELECT
     4    0,                      -- diff_id
     5    warpSkyfile.skycell_id,
     6    warpSkyfile.warp_id,    -- warp1
     7    NULL,                   -- stack1
     8    NULL,                   -- warp2
     9    max_stack_id,           -- stack2
     10    warpSkyfile.tess_id,
     11    0
     12FROM warpSkyfile
     13JOIN warpRun USING(warp_id)
     14LEFT JOIN (
    315    SELECT
    4         0,                      -- diff_id
    5         warpSkyfile.skycell_id,
    6         warpSkyfile.warp_id,    -- warp1
    7         NULL,                   -- stack1
    8         NULL,                   -- warp2
    9         max_stack_id,           -- stack2
    10         warpSkyfile.tess_id,
    11         0
    12         FROM warpSkyfile
    13         JOIN warpRun USING(warp_id)
    14         LEFT JOIN (
    15             SELECT
    16                 MAX(stack_id) AS max_stack_id, -- most recent stack, by virtue of auto-increment
    17                 stackRun.skycell_id,
    18                 stackRun.tess_id,
    19                 filter
    20             FROM stackRun
    21             JOIN stackSumSkyfile USING(stack_id)
    22             WHERE stackSumSkyfile.fault = 0
    23                 AND stackRun.state = 'full'
    24             -- stacks where hook %s
    25             GROUP BY
    26                 skycell_id,
    27                 filter
    28             ) as bestStacks
    29         USING(skycell_id)
    30         WHERE
    31             warpSkyfile.warp_id = %lld
    32             AND ignored = 0
    33             AND filter = '%s'
    34             AND warpSkyfile.tess_id = bestStacks.tess_id
    35         -- (good fraction test goes here for example also above)
    36         -- warp where hook %s
     16        MAX(stack_id) AS max_stack_id, -- most recent stack, by virtue of auto-increment
     17        stackRun.skycell_id,
     18        stackRun.tess_id,
     19        filter
     20    FROM stackRun
     21    JOIN stackSumSkyfile USING(stack_id)
     22    WHERE stackSumSkyfile.fault = 0
     23        AND stackSumSkyfile.quality = 0
     24        AND stackRun.state = 'full'
     25    -- stacks where hook %s
     26    GROUP BY
     27        skycell_id,
     28        filter
     29    ) as bestStacks USING(skycell_id)
     30WHERE
     31    warpSkyfile.warp_id = %lld
     32    AND warpSkyfile.fault = 0
     33    AND warpSkyfile.quality = 0
     34    AND filter = '%s'
     35    AND warpSkyfile.tess_id = bestStacks.tess_id
     36-- warp where hook %s
Note: See TracChangeset for help on using the changeset viewer.