- Timestamp:
- Jun 25, 2009, 2:00:56 PM (17 years ago)
- Location:
- branches/eam_branches/20090522
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/ipp_serial_mops.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090522
- Property svn:mergeinfo changed
-
branches/eam_branches/20090522/ippScripts/scripts/ipp_serial_mops.pl
r24193 r24557 19 19 # Look for programs we need 20 20 my $missing_tools; 21 my $ mops = can_run('ipp_mops_translate.pl') or (warn "Can't find ipp_mops_translate.pl" and $missing_tools = 1);21 my $ppmops = can_run('ppMops') or (warn "Can't find ppMops" and $missing_tools = 1); 22 22 my $dsreg = can_run('dsreg') or (warn "Can't find dsreg" and $missing_tools = 1); 23 23 die "Can't find required tools.\n" if $missing_tools; … … 72 72 die "Unable to connect to database: $DBI::errstr"; 73 73 74 my $where_label = defined $label ? "AND label = '$label'" : ""; # WHERE for label74 my $where_label = defined $label ? "AND diffRun.label = '$label'" : ""; # WHERE for label 75 75 76 76 my $sql = " 77 77 -- Get a list of exposures on which magic may be performed 78 78 SELECT 79 exp_id,79 rawExp.exp_id, 80 80 MAX(diffWarps.diff_id) AS diff_id, 81 -- The following trick pulls out the 'inverse' value for the maximum diff_id 81 -- The following trick pulls out the appropriate values for the maximum diff_id 82 SUBSTRING_INDEX(GROUP_CONCAT(camProcessedTemplate.zpt_obs ORDER BY diffWarps.diff_id), ',', 1) AS zpt_obs, 83 SUBSTRING_INDEX(GROUP_CONCAT(rawTemplate.exp_time ORDER BY diffWarps.diff_id), ',', 1) AS exp_time, 82 84 CONVERT(SUBSTRING_INDEX(GROUP_CONCAT(diffWarps.inverse ORDER BY diffWarps.diff_id), ',', 1), UNSIGNED) AS inverse 83 85 FROM ( … … 86 88 diffRun.diff_id, 87 89 warp1 AS warp_id, 90 warp1 AS template_warp, 88 91 0 AS inverse 89 92 FROM diffRun … … 98 101 diffRun.diff_id, 99 102 warp2 AS warp_id, 103 warp1 AS template_warp, 100 104 1 AS inverse 101 105 FROM diffRun … … 112 116 JOIN chipRun USING(chip_id) 113 117 JOIN rawExp USING(exp_id) 118 JOIN warpRun AS warpTemplate ON warpTemplate.warp_id = diffWarps.template_warp 119 JOIN fakeRun AS fakeTemplate ON fakeTemplate.fake_id = warpTemplate.fake_id 120 JOIN camRun AS camTemplate ON camTemplate.cam_id = fakeTemplate.cam_id 121 JOIN camProcessedExp AS camProcessedTemplate ON camProcessedTemplate.cam_id = camTemplate.cam_id 122 JOIN chipRun AS chipTemplate ON chipTemplate.chip_id = camTemplate.chip_id 123 JOIN rawExp AS rawTemplate ON rawTemplate.exp_id = chipTemplate.exp_id 114 124 WHERE rawExp.camera = '$camera' 115 125 GROUP BY exp_id;"; … … 125 135 foreach my $diff ( @$diffs ) { 126 136 my $exp_id = $diff->{exp_id}; 137 my $zp = $diff->{zpt_obs}; 138 my $exp_time = $diff->{exp_time}; 127 139 my $diff_id = $diff->{diff_id}; 128 140 my $inverse = $diff->{inverse}; 141 142 (carp "Bad ZP or EXPTIME for $exp_id" and next) if not defined $zp or not defined $exp_time; 143 $zp += 2.5 * log($exp_time) / log(10); 129 144 130 145 my $sql = "SELECT * FROM diffSkyfile WHERE diff_id = $diff_id AND fault = 0 AND quality = 0;"; … … 146 161 unless ($no_op) { 147 162 $ipprc->file_prepare($output); 148 my $command = "$ mops --input $input --extname SkyChip.psf --output$output";163 my $command = "$ppmops $input $zp $output"; 149 164 my $success = run( command => $command, verbose => $verbose ); 150 165 (carp "Couldn't translate $input\n" and next) unless $success;
Note:
See TracChangeset
for help on using the changeset viewer.
