IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 5, 2011, 10:05:10 AM (15 years ago)
Author:
eugene
Message:

merging updates from trunk

Location:
branches/eam_branches/ipp-20110404/ippTools/share
Files:
21 edited
24 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110404/ippTools/share/Makefile.am

    r30373 r31439  
    88        addtool_find_cam_id_dvo.sql \
    99        addtool_find_cam_id.sql \
     10        addtool_find_sky_id_dvo.sql \
     11        addtool_find_sky_id.sql \
     12        addtool_find_stack_id_dvo.sql \
     13        addtool_find_stack_id.sql \
    1014        addtool_find_pendingexp.sql \
     15        addtool_find_pendingexp_cam.sql \
     16        addtool_find_pendingexp_stack.sql \
     17        addtool_find_pendingexp_staticsky.sql \
    1118        addtool_find_pendingmergeprocess.sql \
    12         addtool_find_processedexp.sql \
     19        addtool_find_processedexp_cam.sql \
     20        addtool_find_processedexp_stack.sql \
     21        addtool_find_processedexp_staticsky.sql \
    1322        addtool_find_minidvodbprocessed.sql \
    1423        addtool_find_minidvodbrun.sql \
     
    1625        addtool_pendingcleanuprun.sql \
    1726        addtool_queue_cam_id.sql \
     27        addtool_queue_stack_id.sql \
     28        addtool_queue_sky_id.sql \
    1829        addtool_queue_minidvodbrun.sql \
    1930        addtool_revertminidvodbprocessed.sql \
    20         addtool_revertprocessedexp.sql \
     31        addtool_revertprocessedexp_cam.sql \
     32        addtool_revertprocessedexp_stack.sql \
     33        addtool_revertprocessedexp_staticsky.sql \
    2134        bgtool_advancechip.sql \
    2235        bgtool_advancewarp.sql \
     
    164177        disttool_definebyquery_fake.sql \
    165178        disttool_definebyquery_raw.sql \
     179        disttool_definebyquery_raw_no_magic.sql \
    166180        disttool_definebyquery_sky.sql \
    167181        disttool_definebyquery_stack.sql \
     
    400414        diffphottool_advance.sql \
    401415        diffphottool_revert.sql \
    402         diffphottool_data.sql
     416        diffphottool_data.sql \
     417        laptool_definerun.sql \
     418        laptool_exposures.sql \
     419        laptool_inactiveexp.sql \
     420        laptool_listsequence.sql \
     421        laptool_pendingchipexp.sql \
     422        laptool_pendingexp.sql \
     423        laptool_pendingrun.sql \
     424        laptool_stacks.sql
     425
  • branches/eam_branches/ipp-20110404/ippTools/share/addtool_find_cam_id.sql

    r29407 r31439  
    1111                  addRun.dvodb AS previous_dvodb
    1212           FROM addRun
    13            JOIN camRun USING(cam_id)
     13           JOIN camRun on cam_id=stage_id
    1414           JOIN chipRun USING(chip_id)
    1515          ) as foo
    1616     ON exp_id = added_exp_id
     17     AND stage = 'cam'
    1718     -- hook for qualifying the join on the previous_dvodb
    1819     AND %s
  • branches/eam_branches/ipp-20110404/ippTools/share/addtool_find_cam_id_dvo.sql

    r29407 r31439  
    66    AND exp_id NOT IN (SELECT exp_id
    77       FROM addRun
    8        JOIN camRun USING(cam_id)
     8       JOIN camRun on cam_id=stage_id
    99       JOIN chipRun USING(chip_id)
    10        WHERE %s
     10       WHERE stage = 'cam' AND %s
    1111      )
  • branches/eam_branches/ipp-20110404/ippTools/share/addtool_find_pendingexp.sql

    r25816 r31439  
    11SELECT
    2     addRun.*,
    3     camProcessedExp.path_base as camroot,
    4     rawExp.exp_tag,
    5     rawExp.exp_id,
    6     rawExp.exp_name,
    7     rawExp.camera,
    8     rawExp.telescope,
    9     rawExp.filelevel
     2    addRun.*
    103FROM addRun
    11 JOIN camRun
    12     USING(cam_id)
    13 JOIN camProcessedExp
    14     USING(cam_id)
    15 JOIN chipRun
    16     USING(chip_id)
    17 JOIN rawExp
    18     USING(exp_id)
    194LEFT JOIN addProcessedExp
    205    USING(add_id)
     
    227    ON addRun.label = addMask.label
    238WHERE
    24     camRun.state = 'full'
    25     AND ((addRun.state = 'new' AND addProcessedExp.add_id IS NULL) OR addRun.state = 'update')
     9((addRun.state = 'new' AND addProcessedExp.add_id IS NULL) OR addRun.state = 'update')
    2610    AND addRun.dvodb IS NOT NULL
    2711    AND addRun.workdir IS NOT NULL
  • branches/eam_branches/ipp-20110404/ippTools/share/addtool_queue_cam_id.sql

    r28181 r31439  
    22    SELECT
    33        0,              -- add_id
    4         cam_id,         -- cam_id
     4        'cam',          -- stage
     5        cam_id,         -- stage_id
    56        '%s',           -- state
    67        '%s',           -- workdir
  • branches/eam_branches/ipp-20110404/ippTools/share/camtool_find_pendingimfile.sql

  • branches/eam_branches/ipp-20110404/ippTools/share/difftool_listrun.sql

    r29172 r31439  
    2020    camProcessedInput.zpt_lq,
    2121    camProcessedInput.zpt_uq,
     22    camProcessedInput.fwhm_major,
    2223    rawInput.comment,
    2324    rawInput.exp_time,
     
    2526    rawInput.exp_name AS exp_name_1,
    2627    rawInput.exp_id AS exp_id_1,
     28    rawInput.filter AS filter_1,
    2729    rawInput.comment AS comment_1,
    2830    rawInput.dateobs AS dateobs_1,
     
    3436    rawTemplate.exp_name AS exp_name_2,
    3537    rawTemplate.exp_id AS exp_id_2,
     38    rawInput.filter AS filter_2,
    3639    rawTemplate.comment AS comment_2,
    3740    rawTemplate.dateobs AS dateobs_2,
  • branches/eam_branches/ipp-20110404/ippTools/share/difftool_skyfile.sql

    r27743 r31439  
    2424    rawInput.exp_name AS exp_name_1,
    2525    rawInput.exp_id AS exp_id_1,
     26    rawInput.filter AS filter_1,
    2627    chipInput.chip_id AS chip_id_1,
    2728    camInput.cam_id AS cam_id_1,
     
    3132    rawTemplate.exp_name AS exp_name_2,
    3233    rawTemplate.exp_id AS exp_id_2,
     34    rawTemplate.filter AS filter_2,
    3335    chipTemplate.chip_id AS chip_id_2,
    3436    camTemplate.cam_id AS cam_id_2,
  • branches/eam_branches/ipp-20110404/ippTools/share/disttool_pending_SSdiff.sql

    r30387 r31439  
    66    stage_id,
    77    diffSkyfile.skycell_id AS component,
     8    exp_type,
    89    clean,
    910    rawExp.camera,
  • branches/eam_branches/ipp-20110404/ippTools/share/disttool_pending_camera.sql

    r30387 r31439  
    66    stage_id,
    77    'exposure' AS component,
     8    exp_type,
    89    clean,
    910    rawExp.camera,
  • branches/eam_branches/ipp-20110404/ippTools/share/disttool_pending_chip.sql

    r30387 r31439  
    66    stage_id,
    77    chipProcessedImfile.class_id AS component,
     8    exp_type,
    89    distRun.clean,
    910    rawExp.camera,
  • branches/eam_branches/ipp-20110404/ippTools/share/disttool_pending_chip_bg.sql

    r30387 r31439  
    66    stage_id,
    77    chipBackgroundImfile.class_id AS component,
     8    exp_type,
    89    distRun.clean,
    910    rawExp.camera,
  • branches/eam_branches/ipp-20110404/ippTools/share/disttool_pending_diff.sql

    r30387 r31439  
    66    stage_id,
    77    diffSkyfile.skycell_id AS component,
     8    exp_type,
    89    clean,
    910    rawExp.camera,
  • branches/eam_branches/ipp-20110404/ippTools/share/disttool_pending_fake.sql

    r30387 r31439  
    66    stage_id,
    77    fakeProcessedImfile.class_id AS component,
     8    exp_type,
    89    clean,
    910    rawExp.camera,
  • branches/eam_branches/ipp-20110404/ippTools/share/disttool_pending_raw.sql

    r30653 r31439  
     1SELECT * FROM (
     2-- rawExp magicked with re_place
    13SELECT
    24    distRun.dist_id,
     
    68    rawExp.exp_id AS stage_id,
    79    rawImfile.class_id AS component,
     10    rawExp.exp_type,
    811    clean,
    912    rawExp.camera,
     
    3841    AND distRun.stage = 'raw'
    3942    AND distComponent.dist_id IS NULL
    40     AND (rawExp.magicked OR distRun.no_magic)
     43    -- AND (rawExp.magicked OR distRun.no_magic)
     44    AND rawExp.magicked
    4145    -- need to have magicked the chip image which makes the camera mask
    4246    AND chipProcessedImfile.magicked != 0
    4347    AND camRun.magicked > 0
     48    AND (Label.active OR Label.active IS NULL)
     49UNION
     50SELECT
     51    -- raw images no_magic required
     52    distRun.dist_id,
     53    distRun.label,
     54    distTarget.dist_group,
     55    'raw' AS stage,
     56    rawExp.exp_id AS stage_id,
     57    rawImfile.class_id AS component,
     58    rawExp.exp_type,
     59    clean,
     60    rawExp.camera,
     61    CONCAT_WS('.', distRun.outroot, CONVERT(distRun.dist_id, CHAR)) as outdir,
     62    -- XXX: replace this with rawImfile.path_base once it exists
     63    TRIM(TRAILING '.fits' FROM rawImfile.uri) AS path_base,
     64    CAST(NULL AS CHAR(255)) AS alt_path_base,
     65    -- pass camera stage path base since we want the camera mask file. The script knows what to do
     66    CAST(NULL AS CHAR(255)) AS chip_path_base,
     67    CAST(NULL AS CHAR(255)) AS state,
     68    CAST(NULL AS CHAR(255)) AS data_state,
     69    0 as quality,
     70    distRun.no_magic,
     71    rawImfile.magicked,
     72    IFNULL(Label.priority, 10000) AS priority
     73FROM distRun
     74JOIN distTarget USING(target_id, stage, clean)
     75JOIN rawExp ON rawExp.exp_id = stage_id
     76            AND distTarget.stage = 'raw' AND distRun.alternate = 0
     77JOIN rawImfile USING(exp_id)
     78LEFT JOIN distComponent
     79    ON distRun.dist_id = distComponent.dist_id
     80    AND rawImfile.class_id = distComponent.component
     81LEFT JOIN Label ON distRun.label = Label.label
     82WHERE
     83    distRun.state = 'new'
     84    AND distRun.clean = 0
     85    AND distRun.stage = 'raw'
     86    AND distComponent.dist_id IS NULL
     87    AND (distRun.no_magic)
    4488    AND (Label.active OR Label.active IS NULL)
    4589UNION
     
    5296    rawExp.exp_id AS stage_id,
    5397    rawImfile.class_id AS component,
     98    rawExp.exp_type,
    5499    clean,
    55100    rawExp.camera,
     
    96141    rawExp.exp_id AS stage_id,
    97142    'exposure' AS component,
     143    rawExp.exp_type,
    98144    clean,
    99145    rawExp.camera,
     
    120166    AND distComponent.dist_id IS NULL
    121167    AND (Label.active OR Label.active IS NULL)
     168) AS distRun
     169WHERE 1
  • branches/eam_branches/ipp-20110404/ippTools/share/disttool_pending_sky.sql

    r30387 r31439  
    66    stage_id,
    77    stackRun.skycell_id AS component,
     8    exp_type,
    89    clean,
    910    rawExp.camera,
  • branches/eam_branches/ipp-20110404/ippTools/share/disttool_pending_stack.sql

    r30387 r31439  
    66    stage_id,
    77    stackRun.skycell_id AS component,
     8    exp_type,
    89    clean,
    910    rawExp.camera,
  • branches/eam_branches/ipp-20110404/ippTools/share/disttool_pending_warp.sql

    r30387 r31439  
    66    stage_id,
    77    warpSkyfile.skycell_id AS component,
     8    exp_type,
    89    clean,
    910    rawExp.camera,
  • branches/eam_branches/ipp-20110404/ippTools/share/disttool_pending_warp_bg.sql

    r30387 r31439  
    66    stage_id,
    77    warpBackgroundSkyfile.skycell_id AS component,
     8    exp_type,
    89    clean,
    910    rawExp.camera,
  • branches/eam_branches/ipp-20110404/ippTools/share/pxadmin_create_tables.sql

    r31165 r31439  
    18911891) ENGINE=innodb DEFAULT CHARSET=latin1;
    18921892
     1893-- Tables for large area processing
     1894
     1895CREATE TABLE lapSequence (
     1896    seq_id BIGINT AUTO_INCREMENT, -- Identifier for the processing sequence
     1897    name VARCHAR(64) NOT NULL,    -- short name of the sequence
     1898    description VARCHAR(255) NOT NULL, -- longer description of the sequence
     1899    PRIMARY KEY(seq_id),
     1900    KEY(name)
     1901) ENGINE=innodb DEFAULT CHARSET=latin1;
     1902
     1903CREATE TABLE lapRun (
     1904    lap_id BIGINT AUTO_INCREMENT, -- Identifier for the processing run
     1905    seq_id BIGINT NOT NULL,       -- Identifier to match to the sequence
     1906    tess_id VARCHAR(64) NOT NULL, -- tessellation id to use
     1907    projection_cell VARCHAR(64) NOT NULL, -- projection cell from the tessellation to consider
     1908    filter VARCHAR(64) NOT NULL,  -- filter
     1909    state VARCHAR(64) NOT NULL,   -- state of run
     1910    label VARCHAR(64) NOT NULL,   -- processing label
     1911    dist_group VARCHAR(64) NOT NULL, -- distribution group for products of this run
     1912    registered TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- time run was registered
     1913    fault SMALLINT NOT NULL,      -- fault code
     1914    quick_sass_id BIGINT,         -- stackAssociation id for quick stack
     1915    final_sass_id BIGINT,         -- stackAssociation id for final stack
     1916    PRIMARY KEY(lap_id),
     1917    KEY(seq_id),
     1918    KEY(projection_cell),
     1919    KEY(filter),
     1920    KEY(state),
     1921    KEY(label),
     1922    KEY(fault),
     1923    FOREIGN KEY(seq_id) REFERENCES lapSequence(seq_id),
     1924    FOREIGN KEY(quick_sass_id) REFERENCES stackAssociation(sass_id),
     1925    FOREIGN KEY(final_sass_id) REFERENCES stackAssociation(sass_id)
     1926) ENGINE=innodb DEFAULT CHARSET=latin1;
     1927
     1928CREATE TABLE lapExp (
     1929    lap_id BIGINT NOT NULL, -- Link back to processing run
     1930    exp_id BIGINT NOT NULL, -- exposure definition
     1931    chip_id BIGINT,         -- processing id from chipRun
     1932    pair_id BIGINT,         -- companion chip_id
     1933    private TINYINT DEFAULT 0, -- denotes this exposure is private
     1934    pairwise TINYINT DEFAULT 0, -- denotes if this exposure should be pairwise diffed
     1935    active TINYINT DEFAULT 0, -- denotes if this exposure is currently in use
     1936    data_state VARCHAR(64) NOT NULL, -- state of exposure
     1937    PRIMARY KEY (lap_id),
     1938    KEY (exp_id),
     1939    KEY (chip_id),
     1940    KEY (pair_id),
     1941    KEY (data_state),
     1942    FOREIGN KEY (lap_id) REFERENCES lapRun(lap_id),
     1943    FOREIGN KEY (exp_id) REFERENCES rawExp(exp_id),
     1944    FOREIGN KEY (chip_id,exp_id) REFERENCES chipRun(chip_id,exp_id),
     1945    FOREIGN KEY (pair_id) REFERENCES chipRun(chip_id)
     1946) ENGINE=innodb DEFAULT CHARSET=latin1;   
     1947
    18931948-- This comment line is here to avoid empty query error.
    18941949-- Another way to avoid that problem is to omit the semicolon above but I think that is untidy.
  • branches/eam_branches/ipp-20110404/ippTools/share/stacktool_sassskyfile.sql

    r28375 r31439  
    1818        where stack_id = stackRun.stack_id limit 1
    1919    ) as camera
    20 FROM stackRun
    21 JOIN stackSumSkyfile USING(stack_id)
    22 JOIN stackAssociationMap USING(stack_id)
    23 JOIN stackAssociation USING(sass_id)
     20FROM stackAssociation
     21JOIN stackAssociationMap USING(sass_id)
     22JOIN stackRun USING(stack_id)
     23LEFT JOIN stackSumSkyfile USING(stack_id)
Note: See TracChangeset for help on using the changeset viewer.