Ignore:
Timestamp:
01/07/21 14:38:53 (4 years ago)
Author:
tbretz
Message:
Included telescope id and the create query to the raw data extraction.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/hawc/processing/find-calibration-files.sql

    r20026 r20031  
    88      SELECT
    99         -- NIGHT and RUNID of the data file
    10          R1.NIGHT AS NIGHT,
    11          R1.RUNID AS RUNID,
     10         R1.Telescope AS Telescope,
     11         R1.NIGHT     AS NIGHT,
     12         R1.RUNID     AS RUNID,
    1213         -- NIGHT and RUNID of the DRS file
    13          R2.NIGHT AS DrsNight,
    14          R2.RUNID AS DrsRunID,
     14         R2.NIGHT     AS DrsNight,
     15         R2.RUNID     AS DrsRunID,
    1516         -- Time difference between the two
    1617         LEAST(
     
    4041         DoNotUse ON (R2.NIGHT=DoNotUse.NIGHT AND R2.RUNID=DoNotUse.RUNID)
    4142      WHERE
     43         -- Of course claibration must be from the same telescope
     44         R1.Telescope=R2.Telescope
     45      AND
    4246         -- Select all combinations that have a data file in R1 and a drs file (at step 1) in R2
    43          ISNULL(R1.DRSSTEP) AND R2.DRSSTEP=1 
     47         ISNULL(R1.DRSSTEP) AND R2.DRSSTEP=1
    4448      AND
    4549         -- Only DRS files with 100 events and the correct ROI are considered
     
    5155      -- AND ABS(UNIX_TIMESTAMP(R2.`DATE-OBS`)-UNIX_TIMESTAMP(R1.`DATE-OBS`))<78*3600
    5256      ORDER BY
    53      R1.NIGHT, R1.RUNID, DeltaT
     57         R1.Telescope,
     58         R1.NIGHT,
     59         R1.RUNID,
     60         DeltaT
    5461    )
    5562    SELECT
     63       Telescope,
    5664       NIGHT,
    5765       RUNID,
Note: See TracChangeset for help on using the changeset viewer.