source: trunk/Mars/hawc/processing/summary-aux-data.rc@ 20094

Last change on this file since 20094 was 20031, checked in by tbretz, 4 years ago
Included telescope id and the create query to the raw data extraction.
File size: 1.2 KB
Line 
1SELECT
2 *,
3 (TSTARTI+TSTARTF) AS ObsStart,
4 (TSTOPI +TSTOPF) AS ObsEnd,
5 (TSTOPI+TSTOPF-TSTARTI-TSTARTF)*24*3600 AS ObsTime,
6 (TSTOPI+TSTOPF-TSTARTI-TSTARTF)*Efficiency*24*3600 AS EffTime,
7 NTRGMISC/(TSTOPI+TSTOPF-TSTARTI-TSTARTF)/24/3600/Efficiency AS TrgRate,
8 (RateCh0+RateCh1+RateCh2+RateCh3+RateCh4+RateCh5+RateCh6)/7 AS PatchRate,
9 (RateSum0+RateSum1)/2 AS BoardRate,
10 IF(TavgFTM>2048, TavgFTM-4096, TavgFTM) AS Tftm,
11 Cnt500 /((TSTOPI+TSTOPF-TSTARTI-TSTARTF)*Efficiency*24*3600) AS TH500,
12 Cnt750 /((TSTOPI+TSTOPF-TSTARTI-TSTARTF)*Efficiency*24*3600) AS TH750,
13 Cnt1000/((TSTOPI+TSTOPF-TSTARTI-TSTARTF)*Efficiency*24*3600) AS TH1000,
14 Cnt1250/((TSTOPI+TSTOPF-TSTARTI-TSTARTF)*Efficiency*24*3600) AS TH1250,
15 Cnt1500/((TSTOPI+TSTOPF-TSTARTI-TSTARTF)*Efficiency*24*3600) AS TH1500,
16 Cnt2000/((TSTOPI+TSTOPF-TSTARTI-TSTARTF)*Efficiency*24*3600) AS TH2000,
17 Cnt5000/((TSTOPI+TSTOPF-TSTARTI-TSTARTF)*Efficiency*24*3600) AS TH5000
18FROM
19 RawData
20LEFT JOIN
21 AuxData USING (Telescope, NIGHT, RUNID)
22LEFT JOIN
23 SoftwareTrigger USING (Telescope, NIGHT, RUNID)
24LEFT JOIN
25 DoNotUse USING (Telescope, NIGHT, RUNID)
26HAVING
27 ObsTime>0
28ORDER BY
29 Telescope, NIGHT, RUNID
Note: See TracBrowser for help on using the repository browser.