IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32422 for trunk/ippTools/share


Ignore:
Timestamp:
Sep 21, 2011, 11:11:16 AM (15 years ago)
Author:
watersc1
Message:

Update to LAP code.

Location:
trunk/ippTools/share
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/Makefile.am

    r32283 r32422  
    424424        laptool_pendingexp.sql \
    425425        laptool_pendingrun.sql \
     426        laptool_WSdiff_check.sql \
    426427        laptool_stacks.sql
    427428
  • trunk/ippTools/share/laptool_definerun.sql

    r31604 r32422  
    1 SELECT DISTINCT want.exp_id, have.chip_id, false as private, true as active, false as pairwise
     1SELECT DISTINCT
     2  want.exp_id,
     3  have.chip_id,
     4  COALESCE(have.private,false) as private,
     5  true as active,
     6  false as pairwise
    27  FROM
    38  (SELECT exp_id FROM rawExp
     
    813  ) AS want
    914  LEFT JOIN
    10   (SELECT exp_id,MAX(chip_id) AS chip_id, chipRun.state
     15  (SELECT
     16     exp_id,
     17     MAX(chip_id) AS chip_id,
     18     chipRun.state,
     19     lapExp.private
    1120     FROM lapExp JOIN chipRun USING(exp_id,chip_id)
    12      where private IS FALSE
    13      AND chip_id IS NOT NULL
     21     JOIN lapRun USING(lap_id)
     22     where chip_id IS NOT NULL
    1423     AND
    15          (
     24-- This is the restriction to only draw from the current lapSequence
     25     @CHIPWHERE@
     26--       (
    1627          -- (active = TRUE) OR
    17           (chipRun.state = 'full') OR
    18           (chipRun.state = 'new')
     28          -- (chipRun.state = 'full') OR
     29          -- (chipRun.state = 'new')
    1930          -- when we can do updates, put that here.
    20           )
     31--        )
    2132     GROUP BY exp_id
    2233) AS have USING(exp_id)
  • trunk/ippTools/share/laptool_pendingexp.sql

    r31435 r32422  
    33       lapRun.dist_group, lapRun.registered, lapRun.fault, lapRun.quick_sass_id, lapRun.final_sass_id,
    44       exp_id, chip_id, pair_id, private, pairwise, active, lapExp.data_state,
    5        dateobs, object, comment
     5       dateobs, object, comment,
     6       chipRun.state AS chip_state
    67  FROM lapRun JOIN lapExp USING(lap_id)
    78  JOIN rawExp USING(exp_id,filter)
     9  LEFT JOIN chipRun USING(exp_id,chip_id)
    810WHERE active IS TRUE AND lapRun.fault = 0
    911-- lap_id restriction here.
Note: See TracChangeset for help on using the changeset viewer.