IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 8, 2009, 5:09:53 PM (17 years ago)
Author:
eugene
Message:

updates to the addstar stage; modify flatcorr to interact correctly with the addstar stage

File:
1 edited

Legend:

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

    r20397 r25816  
    1010  reduction,
    1111  region,
    12   chip_count,
    13   cam_count
     12  cam_count,
     13  add_count
    1414FROM
    1515  (SELECT
    1616     flatcorrRun.*,
    17      flatcorrChipLink.corr_id as chip_corr_id,
    18      count(flatcorrChipLink.chip_id) as chip_count
     17     flatcorrCamLink.corr_id as cam_corr_id,
     18     count(flatcorrCamLink.cam_id) as cam_count
    1919   FROM flatcorrRun
    20    JOIN flatcorrChipLink
    21      ON flatcorrChipLink.corr_id = flatcorrRun.corr_id
    22   WHERE flatcorrChipLink.include = 1
     20   JOIN flatcorrCamLink
     21  USING (corr_id)
     22  WHERE flatcorrCamLink.include = 1
    2323   GROUP BY
    24      flatcorrChipLink.corr_id) AS t1
     24     flatcorrCamLink.corr_id) AS t1
    2525LEFT JOIN
    2626  (SELECT
    27      flatcorrCamLink.corr_id as cam_corr_id,
    28      count(flatcorrCamLink.cam_id) as cam_count
    29    FROM flatcorrCamLink
    30    JOIN camRun
    31        ON flatcorrCamLink.cam_id = camRun.cam_id
    32    WHERE camRun.state = 'full'
    33      AND flatcorrCamLink.include = 1
     27     flatcorrAddstarLink.corr_id as add_corr_id,
     28     count(flatcorrAddstarLink.add_id) as add_count
     29   FROM flatcorrAddstarLink
     30   JOIN addRun
     31   USING (add_id)
     32   WHERE addRun.state = 'full'
     33     AND flatcorrAddstarLink.include = 1
    3434   GROUP BY
    35        flatcorrCamLink.corr_id) AS t2
    36 ON t1.chip_corr_id = t2.cam_corr_id
    37 WHERE chip_count = cam_count
     35       flatcorrAddstarLink.corr_id) AS t2
     36ON t1.cam_corr_id = t2.add_corr_id
     37WHERE cam_count = add_count
    3838AND state = 'new'
Note: See TracChangeset for help on using the changeset viewer.