- Timestamp:
- Jan 14, 2020, 3:55:25 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/nightly_science.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/nightly_science.pl
r40855 r41226 1494 1494 my $db = init_gpc_db(); 1495 1495 1496 my $obj_sth = "select DISTINCT rawExp.objectfrom 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))"; 1498 1498 1499 1499 my $object_ref = $db->selectall_arrayref( $obj_sth ); … … 1504 1504 foreach my $object_row (@{ $object_ref }) { 1505 1505 my $this_object = shift @{ $object_row }; 1506 my $this_chunk = shift @{ $object_row }; 1506 1507 my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality FROM "; 1507 1508 $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) "; 1508 1509 $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 "; 1510 1511 1511 1512 my $warps = $db->selectall_arrayref( $input_sth ); … … 1646 1647 my $db = init_gpc_db(); 1647 1648 1648 my $obj_sth = "select DISTINCT rawExp.objectfrom 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))"; 1650 1651 1651 1652 my $object_ref = $db->selectall_arrayref( $obj_sth ); … … 1692 1693 foreach my $object_row (@{ $object_ref }) { 1693 1694 my $this_object = shift @{ $object_row }; 1695 my $this_chunk = shift @{ $object_row }; 1694 1696 1695 1697 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 "; 1696 1698 $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) "; 1697 1699 $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 "; 1699 1701 1700 1702 my $warps = $db->selectall_arrayref( $input_sth ); … … 1861 1863 my $db = init_gpc_db(); 1862 1864 1863 my $obj_sth = "select DISTINCT rawExp.objectfrom 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))"; 1865 1867 1866 1868 my $object_ref = $db->selectall_arrayref( $obj_sth ); … … 1907 1909 foreach my $object_row (@{ $object_ref }) { 1908 1910 my $this_object = shift @{ $object_row }; 1911 my $this_chunk = shift @{ $object_row }; 1909 1912 1910 1913 my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality FROM "; 1911 1914 $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) "; 1912 1915 $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 "; 1914 1917 1915 1918 my $warps = $db->selectall_arrayref( $input_sth );
Note:
See TracChangeset
for help on using the changeset viewer.
