Ignore:
Timestamp:
09/05/21 07:13:17 (3 years ago)
Author:
maslowski
Message:
Added Telescope as command line parameter. And fixed some bugs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/hawc/processing/DiskToDB/write-calibration-query.sh

    r20103 r20104  
    9797UPDATE DataOnDisk
    9898SET DataOnDisk.calibration = 6
    99 WHERE DataOnDisk.header != 0;
     99WHERE DataOnDisk.header != 0
     100AND NIGHT=${NIGHT}
     101AND Telescope=${TEL};
    100102
    101103CREATE TEMPORARY TABLE Calibration_tmp
     
    205207UPDATE DataOnDisk
    206208SET DataOnDisk.calibration = 0
    207 WHERE DataOnDisk.header = 0;
     209WHERE DataOnDisk.header = 0
     210AND NIGHT=${NIGHT}
     211AND Telescope=${TEL};
    208212
    209213-- Set Status to 2 if there was no drs file with step = 1 in the NIGHT
    210214UPDATE DataOnDisk
    211215SET DataOnDisk.calibration = 2
    212 WHERE EXISTS(SELECT * FROM Calibration WHERE NIGHT=${NIGHT}) = 0;
     216WHERE EXISTS(
     217        SELECT * FROM Calibration
     218        WHERE NIGHT=${NIGHT}
     219        AND Telescope=${TEL}
     220        ) = 0;
    213221"\ >> ${OUTPUT}
Note: See TracChangeset for help on using the changeset viewer.