IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40794 for trunk


Ignore:
Timestamp:
Jun 18, 2019, 2:00:16 PM (7 years ago)
Author:
tdeboer
Message:

improve hadnling of chunks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/night_report.pl

    r40793 r40794  
    776776    $query .= "     SELECT dateobs,comment,substr(comment, 1, position(' ' in comment)) AS chunk,count(distinct(comment)) AS Nquad_firstvisit";
    777777    $query .= "     FROM rawExp";
    778     $query .= "     WHERE dateobs LIKE '$date%'";
     778    $query .= "     WHERE dateobs LIKE '$date%' AND exp_id > $refExpID";
    779779    $query .= "     AND (obs_mode LIKE '%SS%' OR obs_mode LIKE '%BRIGHT%') AND obs_mode NOT LIKE 'ENGINEERING'";
    780780    $query .= "     AND comment LIKE '%visit 1%'";
     
    786786    $query .= "       (SELECT substr(comment, 1, position(' ' in comment)) AS chunk,count(distinct(comment)) AS Nvisits";
    787787    $query .= "         FROM rawExp";
    788     $query .= "         WHERE dateobs LIKE '$date%' AND (obs_mode LIKE '%SS%' OR obs_mode LIKE '%BRIGHT%')";
     788    $query .= "         WHERE dateobs LIKE '$date%' AND exp_id > $refExpID AND (obs_mode LIKE '%SS%' OR obs_mode LIKE '%BRIGHT%')";
    789789    $query .= "         AND obs_mode NOT LIKE 'ENGINEERING' AND comment LIKE '%visit%'";
    790790    $query .= "         GROUP BY object, filter, chunk";
     
    808808          my $query2 .= "     SELECT warp_id FROM ";
    809809          $query2 .= "           warpRun JOIN fakeRun USING (fake_id) JOIN camRun USING (cam_id) JOIN camProcessedExp USING (cam_id) JOIN chipRun USING (chip_id) JOIN rawExp USING (exp_id)";
    810           $query2 .= "           WHERE rawExp.dateobs LIKE '$date%' AND (obs_mode LIKE '%SS%' OR obs_mode LIKE '%BRIGHT%')";
     810          $query2 .= "           WHERE rawExp.dateobs LIKE '$date%' AND exp_id > $refExpID AND (obs_mode LIKE '%SS%' OR obs_mode LIKE '%BRIGHT%')";
    811811          $query2 .= "           AND substr(comment, 1, position(' ' in comment)) LIKE '$chunkname%'";
    812812          my $result2 = &mysql_select ($query2);
     
    840840}
    841841
     842
    842843exit 0;
    843844
Note: See TracChangeset for help on using the changeset viewer.