IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41225


Ignore:
Timestamp:
Jan 14, 2020, 12:49:42 PM (7 years ago)
Author:
tdeboer
Message:

chunk check and parsing for ww diffs added to nightly_science.pl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20170121/ippScripts/scripts/nightly_science.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
    r40856 r41225  
    14941494    my $db = init_gpc_db();
    14951495
    1496     my $obj_sth = "select DISTINCT rawExp.object from warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) ";
    1497     $obj_sth .= " WHERE warpRun.state = 'full' AND warpRun.label = '$label' AND warpRun.data_group = '$data_group' AND rawExp.filter = '$filter' ORDER BY rawExp.object";
     1496    my $obj_sth = "select rawExp.object,substr(rawExp.comment, 1, position(' ' in rawExp.comment)) from warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) ";
     1497    $obj_sth .= " WHERE warpRun.state = 'full' AND warpRun.label = '$label' AND warpRun.data_group = '$data_group' AND rawExp.filter = '$filter' GROUP BY rawExp.object,substr(rawExp.comment, 1, position(' ' in rawExp.comment))";
    14981498
    14991499    my $object_ref = $db->selectall_arrayref( $obj_sth );
     
    15041504    foreach my $object_row (@{ $object_ref }) {
    15051505        my $this_object = shift @{ $object_row };       
     1506        my $this_chunk = shift @{ $object_row };
    15061507        my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality FROM ";
    15071508        $input_sth .=   " rawExp LEFT JOIN chipRun USING (exp_id) LEFT JOIN camRun USING (chip_id) LEFT JOIN camProcessedExp USING(cam_id) LEFT JOIN fakeRun USING (cam_id) LEFT JOIN warpRun USING (fake_id) ";
    15081509        $input_sth .=   " WHERE chipRun.label = '$label' AND chipRun.data_group = '$data_group' AND rawExp.filter = '$filter' AND rawExp.object = '$this_object' ";
    1509         $input_sth .=   " ORDER BY dateobs ";
     1510        $input_sth .=   " AND substr(rawExp.comment, 1, position(' ' in rawExp.comment)) = '$this_chunk' ORDER BY dateobs ";
    15101511
    15111512        my $warps = $db->selectall_arrayref( $input_sth );
     
    16461647    my $db = init_gpc_db();
    16471648
    1648     my $obj_sth = "select DISTINCT rawExp.object from warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) ";
    1649     $obj_sth .= " WHERE warpRun.state = 'full' AND warpRun.label = '$label' AND warpRun.data_group = '$data_group' AND rawExp.filter = '$filter' ORDER BY rawExp.object";
     1649    my $obj_sth = "select rawExp.object,substr(rawExp.comment, 1, position(' ' in rawExp.comment)) from warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) ";
     1650    $obj_sth .= " WHERE warpRun.state = 'full' AND warpRun.label = '$label' AND warpRun.data_group = '$data_group' AND rawExp.filter = '$filter' GROUP BY rawExp.object,substr(rawExp.comment, 1, position(' ' in rawExp.comment))";
    16501651
    16511652    my $object_ref = $db->selectall_arrayref( $obj_sth );
     
    16921693    foreach my $object_row (@{ $object_ref }) {
    16931694        my $this_object = shift @{ $object_row };
     1695        my $this_chunk = shift @{ $object_row };
    16941696       
    16951697        my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality,substr(comment, 1, position(' ' in comment)) FROM ";
    16961698        $input_sth .=   " rawExp LEFT JOIN chipRun USING (exp_id) LEFT JOIN camRun USING (chip_id) LEFT JOIN camProcessedExp USING(cam_id) LEFT JOIN fakeRun USING (cam_id) LEFT JOIN warpRun USING (fake_id) ";
    16971699        $input_sth .=   " WHERE chipRun.label = '$label' AND chipRun.data_group = '$data_group' AND rawExp.filter = '$filter' AND rawExp.object = '$this_object' ";
    1698         $input_sth .=   " ORDER BY dateobs ";
     1700        $input_sth .=   " AND substr(rawExp.comment, 1, position(' ' in rawExp.comment)) = '$this_chunk' ORDER BY dateobs ";
    16991701
    17001702        my $warps = $db->selectall_arrayref( $input_sth );
     
    18611863    my $db = init_gpc_db();
    18621864
    1863     my $obj_sth = "select DISTINCT rawExp.object from warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) ";
    1864     $obj_sth .= " WHERE warpRun.state = 'full' AND warpRun.label = '$label' AND warpRun.data_group = '$data_group' AND rawExp.filter = '$filter' ORDER BY rawExp.object";
     1865    my $obj_sth = "select rawExp.object,substr(rawExp.comment, 1, position(' ' in rawExp.comment)) from warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) ";
     1866    $obj_sth .= " WHERE warpRun.state = 'full' AND warpRun.label = '$label' AND warpRun.data_group = '$data_group' AND rawExp.filter = '$filter' GROUP BY rawExp.object,substr(rawExp.comment, 1, position(' ' in rawExp.comment))";
    18651867
    18661868    my $object_ref = $db->selectall_arrayref( $obj_sth );
     
    19071909    foreach my $object_row (@{ $object_ref }) {
    19081910        my $this_object = shift @{ $object_row };
     1911        my $this_chunk = shift @{ $object_row };
    19091912       
    19101913        my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality FROM ";
    19111914        $input_sth .=   " rawExp LEFT JOIN chipRun USING (exp_id) LEFT JOIN camRun USING (chip_id) LEFT JOIN camProcessedExp USING(cam_id) LEFT JOIN fakeRun USING (cam_id) LEFT JOIN warpRun USING (fake_id) ";
    19121915        $input_sth .=   " WHERE chipRun.label = '$label' AND chipRun.data_group = '$data_group' AND rawExp.filter = '$filter' AND rawExp.object = '$this_object' ";
    1913         $input_sth .=   " ORDER BY dateobs ";
     1916        $input_sth .=   " AND substr(rawExp.comment, 1, position(' ' in rawExp.comment)) = '$this_chunk' ORDER BY dateobs ";
    19141917
    19151918        my $warps = $db->selectall_arrayref( $input_sth );
Note: See TracChangeset for help on using the changeset viewer.