IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26567 for trunk/ippTools/share


Ignore:
Timestamp:
Jan 12, 2010, 2:07:51 PM (17 years ago)
Author:
bills
Message:

Make update processing compatible with magic. Fix some bugs in update for the warp stage
Make script changes to implement update for diff stage.
Change value of 'magicked' in the various runs and files to contain the value
the magic_id of the magicRun that corresponds to the streaks file used for desreaking.

Location:
trunk/ippTools/share
Files:
16 edited

Legend:

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

    r23617 r26567  
    99    rawExp.camera,
    1010    rawExp.telescope,
    11     rawExp.filelevel
     11    rawExp.filelevel,
     12    chipRun.magicked AS chip_magicked
    1213FROM camRun
    1314JOIN chipRun
  • trunk/ippTools/share/camtool_queue_chip_id.sql

    r25835 r26567  
    1616        '%s',           -- tess_id
    1717        '%s',           -- end_stage
    18         0,              -- magicked
    19         '%s'           -- note
     18        %lld,           -- magicked
     19        '%s'            -- note
    2020    FROM chipRun
    2121    WHERE
  • trunk/ippTools/share/chiptool_change_exp_state.sql

    r19702 r26567  
    44-- the chipProcessedImfile sub query
    55UPDATE chipRun
    6     SET state = '%s'
     6JOIN rawExp using(exp_id)
     7    SET chipRun.state = '%s'
     8    -- set magicked hook %s
    79    WHERE
    810    chipRun.chip_id = %lld
  • trunk/ippTools/share/chiptool_completely_processed_exp.sql

    r25835 r26567  
    1414    tess_id,
    1515    end_stage,
    16     all_files_magicked as magicked,
     16    imfile_magicked as magicked,
    1717    note
    1818FROM
     
    2121        rawImfile.class_id as rawimfile_class_id,
    2222        chipProcessedImfile.class_id,
    23         SUM(!chipProcessedImfile.magicked) = 0 as all_files_magicked
     23        -- XXX using chipProcessedImfile assumes that all imfile's have
     24        -- the same magicked value if that isn't right then more than one
     25        -- row will be returned. In practice this is the case but bugs could
     26        -- cause it to not be true.
     27        -- We could use rawExp.magicked but that would make it possible for
     28        -- the chipRun to have a different magicked value than the imfiles
     29        chipProcessedImfile.magicked AS imfile_magicked
    2430    FROM chipRun
    2531    JOIN rawImfile
  • trunk/ippTools/share/difftool_change_run_state.sql

    r25800 r26567  
    55UPDATE diffRun
    66    SET state = '%s'
     7    -- set magicked hook %s
    78    WHERE
    89    diffRun.diff_id = %lld
  • trunk/ippTools/share/difftool_change_skyfile_data_state.sql

    r25800 r26567  
    55    SET
    66    data_state = '%s'
     7    -- magicked hook %s
    78WHERE
    89    diff_id = %lld
  • trunk/ippTools/share/difftool_todiffskyfile.sql

    r24174 r26567  
    6565    OR (diffRun.state = 'update'
    6666    AND diffSkyfile.fault = 0
    67     AND diffSkyfile.quality = 0)
     67    AND diffSkyfile.data_state = 'cleaned')
    6868    )
    6969-- Ensure input warps are available
  • trunk/ippTools/share/disttool_pending_camera.sql

    r25838 r26567  
    3030    AND distRun.stage = 'camera'
    3131    AND distComponent.dist_id IS NULL
    32     AND (distRun.clean OR (chipRun.magicked AND camRun.magicked) OR distRun.no_magic)
     32    AND (((chipRun.magicked > 0) AND (camRun.magicked > 0)) OR distRun.no_magic)
    3333    AND (camRun.state = 'full' OR (distRun.clean AND camRun.state = 'cleaned'))
  • trunk/ippTools/share/disttool_pending_chip.sql

    r25838 r26567  
    2828    AND distRun.stage = 'chip'
    2929    AND distComponent.dist_id IS NULL
    30     AND (distRun.clean OR chipRun.magicked OR distRun.no_magic)
     30    AND ((chipRun.magicked > 0) OR distRun.no_magic)
    3131    AND (chipRun.state = 'full' OR (distRun.clean AND chipRun.state = 'cleaned'))
  • trunk/ippTools/share/disttool_pending_diff.sql

    r25838 r26567  
    3636    AND distRun.stage = 'diff'
    3737    AND distComponent.dist_id IS NULL
    38     AND (distRun.clean OR diffRun.magicked OR distRun.no_magic)
     38    AND ((diffRun.magicked > 0) OR distRun.no_magic)
    3939    AND (diffRun.state = 'full' OR (distRun.clean AND diffRun.state = 'cleaned'))
  • trunk/ippTools/share/disttool_pending_warp.sql

    r25838 r26567  
    3131    AND distRun.stage = 'warp'
    3232    AND distComponent.dist_id IS NULL
    33     AND (distRun.clean OR warpRun.magicked OR distRun.no_magic)
     33    AND ((warpRun.magicked > 0) OR distRun.no_magic)
    3434    AND (warpRun.state = 'full' OR (distRun.clean AND warpRun.state = 'cleaned'))
  • trunk/ippTools/share/warptool_change_run_state.sql

    r19521 r26567  
    44-- the chipProcessedImfile sub query
    55UPDATE warpRun
    6     SET state = '%s'
     6JOIN fakeRun USING(fake_id)
     7JOIN camRun USING(cam_id)
     8JOIN chipRun USING(chip_id)
     9    SET warpRun.state = '%s'
     10    -- set magicked  hook %s
    711    WHERE
    812    warpRun.warp_id = %lld
     
    1216        WHERE
    1317            warpSkyfile.warp_id = warpRun.warp_id
    14             AND data_state != '%s'
     18            AND warpSkyfile.data_state != '%s'
    1519        ) = 0
  • trunk/ippTools/share/warptool_change_skyfile_data_state.sql

    r23418 r26567  
    11-- handle changes in warpSkyfile.data_state.
    2 -- Used for the modes tocleanedskyfile and topurgedskyfile
    3 -- args are new data_state, warp_id, skycell_id and current expected state for warpRun
     2-- Used for the modes tofullskyfile, tocleanedskyfile and topurgedskyfile
     3-- args are new data_state, string for magic hook, warp_id, skycell_id and current expected state for warpRun
    44UPDATE warpSkyfile
     5JOIN warpRun USING(warp_id)
     6JOIN fakeRun USING(fake_id)
     7JOIN camRun USING(cam_id)
     8JOIN chipRun USING(chip_id)
    59    SET
    610    data_state = '%s'
     11    -- set magicked hook %s
    712WHERE
    813    warp_id = %lld
  • trunk/ippTools/share/warptool_finish_run.sql

    r23430 r26567  
    11UPDATE warpRun
    22    SET state = 'full',
    3     magicked = %d
     3    magicked = %lld
    44WHERE warp_id = %lld
    55
  • trunk/ippTools/share/warptool_finished_run_select.sql

    r24043 r26567  
    88       warpSkyCellMap.warp_id as foo,
    99       warpSkyfile.warp_id as bar,
    10        SUM(!warpSkyfile.magicked) = 0 as magicked
     10       warpSkyfile.magicked as magicked
    1111   FROM warpRun
    1212   JOIN warpSkyCellMap
  • trunk/ippTools/share/warptool_towarped.sql

    r24487 r26567  
    4040        AND warpSkyfile.tess_id IS NULL)
    4141    OR (warpRun.state = 'update'
     42        AND chipRun.magicked >= 0
     43        AND warpSkyfile.fault = 0
    4244        AND warpSkyfile.data_state = 'cleaned')
    4345    )
Note: See TracChangeset for help on using the changeset viewer.