Changeset 29124 for branches/eam_branches/ipp-20100823/ippScripts
- Timestamp:
- Sep 7, 2010, 9:16:10 AM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100823
- Files:
-
- 6 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/automate_stacks.pl (modified) (2 diffs)
-
ippScripts/scripts/dist_bundle.pl (modified) (1 diff)
-
ippScripts/scripts/dist_defineruns.pl (modified) (1 diff)
-
ippScripts/scripts/magic_destreak_cleanup.pl (modified) (7 diffs)
-
ippScripts/scripts/staticsky.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100823
-
branches/eam_branches/ipp-20100823/ippScripts/scripts/automate_stacks.pl
r28982 r29124 123 123 defined $queue_chips or defined $queue_stacks or $queue_sweetspot or $queue_detrends or $queue_dqstats or 124 124 defined $check_chips or defined $check_stacks or $check_sweetspot or $check_detrends or $check_dqstats or 125 defined $test_mode or defined $clean_old or defined $check_mode; 125 defined $test_mode or defined $clean_old or defined $check_mode or 126 defined $confirm_stacks; 126 127 127 128 # Configurable parameters from our config file. … … 1271 1272 print STDERR "confirm_stacks: Target $target on $date is not done stacking. $Nstacks $Nattempted\n" 1272 1273 } 1274 if ($metadata_out{nsState} eq 'CONFIRM_STACKING') { 1275 $metadata_out{nsState} = 'STACKING'; 1276 } 1277 1273 1278 next; 1274 1279 } 1275 if (defined($pretend)) { 1276 add_to_macro_list('check_confirm_stacks',$stackable_list{$target},$date,$target); 1277 } 1278 else { 1279 add_to_macro_list('confirm_stacks',$stackable_list{$target},$date,$target); 1280 if ($metadata_out{nsState} eq 'CONFIRM_STACKING') { 1281 if (defined($pretend)) { 1282 add_to_macro_list('check_confirm_stacks',$stackable_list{$target},$date,$target); 1283 } 1284 else { 1285 add_to_macro_list('confirm_stacks',$stackable_list{$target},$date,$target); 1286 } 1280 1287 } 1281 1288 } -
branches/eam_branches/ipp-20100823/ippScripts/scripts/dist_bundle.pl
r28963 r29124 154 154 # 2. magic is not required for this distRun 155 155 # 3. the processing for the component produced no images (warp or diff with bad quality for example) 156 my $nan_masked_pixels = ! ($clean || (($stage eq "camera") || ($stage eq 'fake') || ($stage eq 'stack') ) || $no_magic || $poor_quality);156 my $nan_masked_pixels = ! ($clean || (($stage eq "camera") || ($stage eq 'fake') || ($stage eq 'stack') || ($stage eq 'sky')) || $no_magic || $poor_quality); 157 157 158 158 my ($image, $mask, $variance); -
branches/eam_branches/ipp-20100823/ippScripts/scripts/dist_defineruns.pl
r28536 r29124 83 83 push @stages, $stage; 84 84 } else { 85 @stages = qw( raw chip chip_bg camera fake warp warp_bg diff stack SSdiff );85 @stages = qw( raw chip chip_bg camera fake warp warp_bg diff stack SSdiff sky); 86 86 } 87 87 -
branches/eam_branches/ipp-20100823/ippScripts/scripts/magic_destreak_cleanup.pl
r27785 r29124 38 38 39 39 # Parse the command-line arguments 40 my ($magic_ds_id, $camera );40 my ($magic_ds_id, $camera, $stage); 41 41 my ($dbname, $save_temps, $verbose, $no_update, $no_op, $logfile); 42 42 … … 44 44 'magic_ds_id=s' => \$magic_ds_id,# Magic destreak run identifier 45 45 'camera=s' => \$camera, # camera for evaluating file rules 46 'stage=s' => \$stage, # camera for evaluating file rules 46 47 'save-temps' => \$save_temps, # Save temporary files? 47 48 'dbname=s' => \$dbname, # Database name … … 56 57 -exitval => 3) unless 57 58 defined $magic_ds_id and 58 defined $camera; 59 # defined $stage and 60 # defined $stage_id; 59 defined $camera and 60 defined $stage; 61 61 62 62 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_ds_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration … … 79 79 my $dbh = DBI->connect($dsn, $dbuser, $dbpassword) or die "Cannot connect to mysql server\n"; 80 80 81 my $q1 = "SELECT magicDSRun.*, camera, camProcessedExp.path_base AS cam_path_base, camRun.reduction AS cam_reduction, magicRun.inverse" 82 . " FROM magicDSRun JOIN magicRun USING(magic_id) JOIN rawExp USING(exp_id) LEFT JOIN camProcessedExp USING(cam_id) LEFT JOIN camRun USING(cam_id)" 83 . " WHERE magic_ds_id = $magic_ds_id"; 81 my $q1; 82 83 if ($stage ne 'diff') { 84 $q1 = "SELECT magicDSRun.*, camera, camProcessedExp.path_base AS cam_path_base, camRun.reduction AS cam_reduction" 85 . " FROM magicDSRun JOIN magicRun USING(magic_id) JOIN rawExp USING(exp_id) LEFT JOIN camProcessedExp USING(cam_id) LEFT JOIN camRun USING(cam_id)"; 86 } else { 87 $q1 = "SELECT magicDSRun.*, diffRun.diff_mode FROM magicDSRun JOIN diffRun ON stage_id = diffRun.diff_id AND stage = 'diff'"; 88 } 89 $q1 .= " WHERE magic_ds_id = $magic_ds_id"; 90 84 91 my $q2 = "SELECT * from magicDSFile where magic_ds_id = $magic_ds_id"; 85 92 … … 89 96 &my_die ("Unable to find magicDSRun $magic_ds_id", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if !$nrows; 90 97 my $run = $stmt1->fetchrow_hashref(); 98 $stmt1->finish(); 91 99 92 100 my $state = $run->{state}; 93 my $stage = $run->{stage};94 101 my $stage_id = $run->{stage_id}; 95 102 my $cam_path_base = $run->{cam_path_base}; 96 103 my $cam_reduction = $run->{cam_reduction}; 97 104 $cam_reduction = 'DEFAULT' if !$cam_reduction or ($cam_reduction eq 'NULL'); 98 my $inverse = $run->{inverse}; 105 106 my $warp_warp = ($stage eq 'diff' and $run->{diff_mode} eq 1); 99 107 100 108 … … 105 113 &my_die("clean not allowed for raw stage, use goto_restore", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $stage eq "raw"; 106 114 107 my $recipe_psastro = $ipprc->reduction($cam_reduction, 'PSASTRO'); # Recipe to use 108 &my_die("Unrecognised PSASTRO recipe", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe_psastro; 115 my $recipe_psastro; 116 if ($stage eq 'chip') { 117 $recipe_psastro = $ipprc->reduction($cam_reduction, 'PSASTRO'); # Recipe to use 118 &my_die("Unrecognised PSASTRO recipe", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe_psastro; 119 } 109 120 110 121 … … 217 228 delete_files($rimage, $rmask, $rweight, $rsources, $rastrom, $bimage, $bmask, $bweight, $bsources, $bastrom, $bch_mask, $rch_mask); 218 229 219 if ($stage eq "diff" and $ inverse) {230 if ($stage eq "diff" and $warp_warp) { 220 231 my $name = "PPSUB.INVERSE"; 221 232 if ($backup_path_base) { -
branches/eam_branches/ipp-20100823/ippScripts/scripts/staticsky.pl
r28962 r29124 71 71 $ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $sky_id, $PS_EXIT_SYS_ERROR ) if $redirect; 72 72 73 my $traceDest = $ipprc->filename("TRACE.EXP", $outroot); 73 74 # my $source_id = $ipprc->source_id($dbname, $PS_TABLE_ID_STATICSKY); 74 75 … … 164 165 $command .= " -recipe PSPHOT $recipe_psphot"; 165 166 $command .= " -dumpconfig $configuration"; 166 #$command .= " -tracedest $traceDest -log $logDest";167 $command .= " -tracedest $traceDest -log $logDest"; 167 168 # $command .= " -dbname $dbname" if defined $dbname; 168 169 # $command .= " -image_id $diff_skyfile_id" if defined $diff_skyfile_id;
Note:
See TracChangeset
for help on using the changeset viewer.
