Changeset 38054
- Timestamp:
- Mar 29, 2015, 5:45:15 AM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150112/ippScripts/scripts
- Files:
-
- 9 edited
-
. (modified) (1 prop)
-
mergedvodb_merge.pl (modified) (1 diff)
-
psphot_fullforce_warp.pl (modified) (5 diffs)
-
sc_prepare_camera.pl (modified) (5 diffs)
-
sc_prepare_stack.pl (modified) (2 diffs)
-
sc_remote_exec.pl (modified) (1 prop)
-
skycalibration.pl (modified) (1 diff)
-
stack_bkg_mk_mdc.pl (modified) (4 diffs)
-
staticsky.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150112/ippScripts/scripts
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20150326/ippScripts/scripts (added) merged: 38032
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20150112/ippScripts/scripts/mergedvodb_merge.pl
r35306 r38054 156 156 $merge_command = "rsync -rvat $minidvodb_path/* $mergedvodb_path"; 157 157 } else { 158 $merge_command = "$dvomerge -parallel $minidvodb_path into $mergedvodb_path"; 158 # $merge_command = "$dvomerge -parallel $minidvodb_path into $mergedvodb_path"; 159 $merge_command = "$dvomerge -matched-tables $minidvodb_path into $mergedvodb_path"; 159 160 } 160 161 print "\n$merge_command\n"; -
branches/eam_branches/ipp-20150112/ippScripts/scripts/psphot_fullforce_warp.pl
r37053 r38054 124 124 } 125 125 126 # XXX: need to figure out whether this works or not 127 # We probably want to create a specific recipe that looks at the results 128 my $recipe_ppstats = 'WARPSTATS'; 129 my $doStats = 0; 126 my $doStats = 1; 130 127 131 128 print "reduction: $reduction\n"; … … 166 163 167 164 my $cmdflags = ""; 165 my $quality = 0; 168 166 169 167 # Perform psphotFullForce … … 182 180 if ($doStats) { 183 181 $command .= " -stats $outputStats"; 184 $command .= " -recipe PPSTATS $recipe_ppstats";185 182 } 186 183 $command .= " -F PSPHOT.OUTPUT PSPHOT.OUT.CMF.MEF"; … … 198 195 } 199 196 200 # Stats: TODO201 197 if ($doStats) { 202 198 check_output($outputStats, 1); 203 199 my $outputStatsReal = $ipprc->file_resolve($outputStats); 204 200 205 # measure chip stats201 # analyze the stats file 206 202 $command = "$ppStatsFromMetadata $outputStatsReal - WARP_SKYCELL"; 207 203 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 216 212 chomp $cmdflags; 217 213 } 218 my ($quality) = $cmdflags =~ /-quality (\d+)/; # Quality flag 219 220 if (!$quality) { 221 check_output($outputSources, 1); 222 } 214 ($quality) = $cmdflags =~ /-quality (\d+)/; # Quality flag 215 223 216 } else { 224 217 print "Not executing: $command\n"; 225 218 } 219 } 220 221 if (!$quality) { 222 check_output($outputSources, 1); 226 223 } 227 224 -
branches/eam_branches/ipp-20150112/ippScripts/scripts/sc_prepare_camera.pl
r37833 r38054 14 14 use Data::Dumper; 15 15 use File::Basename; 16 use File::Temp qw( tempfile ); 16 17 17 18 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); … … 30 31 my $remotetool = can_run('remotetool') or (warn "Can't find remotetool" and $missing_tools = 1); 31 32 my $camtool = can_run('camtool') or (warn "Can't find camtool" and $missing_tools = 1); 33 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1); 32 34 33 35 if ($missing_tools) { … … 88 90 my ($workdir,$exp_tag,$reduction); 89 91 { 92 ### $command = "$camtool -processedexp -cam_id $cam_id "; ### THIS LINE ONLY TO TEST! 90 93 my $command = "$camtool -pendingexp -cam_id $cam_id "; 91 94 $command .= " -dbname $dbname " if defined($dbname); … … 142 145 my $pre_cmd_cmfs = "ls -1 ${remote_chip_path}*.cmf > ${remote_outroot}.cmflist"; 143 146 my $pre_cmd_masks= "ls -1 ${remote_chip_path}*.mk.fits > ${remote_outroot}.masklist"; 147 148 # Despite the previous comment, we do care about the output of pendingimfile, as that 149 # contains information for the exposure. 150 my ($statFile, $statName) = tempfile( "/tmp/cm.$cam_id.stats.XXXX", UNLINK => 1 ); 151 foreach my $line (@$stdout_buf) { 152 print $statFile $line; 153 } 154 close $statFile; 155 156 # parse the stats in the metadata file 157 $command = "$ppStatsFromMetadata $statName - CAMERA_EXP_IMFILE"; 158 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 159 run(command => $command, verbose => $verbose); 160 unless ($success) { 161 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 162 warn("Unable to perform ppStatsFromMetadata: $error_code\n"); 163 exit($error_code); 164 } 165 166 my $results = ''; 167 foreach my $line (@$stdout_buf) { 168 $results .= " $line"; 169 } 170 chomp($results); 171 172 144 173 145 174 my $recipe_psastro = $ipprc->reduction($reduction, 'PSASTRO'); # Recipe to use … … 163 192 $camtool_post_cmd .= " -dbname $dbname " if defined $dbname; 164 193 $camtool_post_cmd .= " -path_base $ipp_outroot -hostname $remote_hostname -dtime_script 0 "; 194 $camtool_post_cmd .= " $results "; # Add exposure information 165 195 my $post_cmd_echo = " echo -n \"$camtool_post_cmd\" > ${remote_outroot}.dbinfo "; 166 196 my $post_cmd_SfM = " ppStatsFromMetadata ${remote_outroot}.stats - CAMERA_EXP_FPA >> ${remote_outroot}.dbinfo "; -
branches/eam_branches/ipp-20150112/ippScripts/scripts/sc_prepare_stack.pl
r37833 r38054 23 23 my $remote_hostname = "LANL/Mustang"; # Name of the remote node. 24 24 my $threads_req = 4; # How many threads are we going to use? 25 my $have_warps = 0; # Do we have a copy of the warp if we don't find one there? 25 26 26 27 my $fail_state = "prep_fail"; … … 156 157 my $ipp_disk; 157 158 # ${remote_root}/tmp/${ipp_disk} 158 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".fits"); 159 ($ipp_disk,undef) = &uri_convert($warp_path_base . ".fits"); 160 print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n"; 161 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".wt.fits"); 162 ($ipp_disk,undef) = &uri_convert($warp_path_base . ".wt.fits"); 163 print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n"; 164 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".mask.fits"); 165 ($ipp_disk,undef) = &uri_convert($warp_path_base . ".mask.fits"); 166 print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n"; 167 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".cmf"); 168 ($ipp_disk,undef) = &uri_convert($warp_path_base . ".cmf"); 169 print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n"; 170 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".psf"); 171 ($ipp_disk,undef) = &uri_convert($warp_path_base . ".psf"); 172 print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n"; 159 160 if ($have_warps != 0) { # Check to see if we have a copy, because if we do, then we can send it over if it's missing. 161 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".fits"); 162 ($ipp_disk,undef) = &uri_convert($warp_path_base . ".fits"); 163 print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n"; 164 165 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".wt.fits"); 166 ($ipp_disk,undef) = &uri_convert($warp_path_base . ".wt.fits"); 167 print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n"; 168 169 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".mask.fits"); 170 ($ipp_disk,undef) = &uri_convert($warp_path_base . ".mask.fits"); 171 print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n"; 172 173 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".cmf"); 174 ($ipp_disk,undef) = &uri_convert($warp_path_base . ".cmf"); 175 print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n"; 176 177 (undef,$remote_file) = &uri_to_outputs($warp_path_base . ".psf"); 178 ($ipp_disk,undef) = &uri_convert($warp_path_base . ".psf"); 179 print COMPMAP "$remote_file ${remote_root}/tmp/${ipp_disk}\n"; 180 181 } 182 else { 183 $remote_file = &uri_local_to_remote($warp_path_base . ".fits"); 184 print COMPMAP "$remote_file $remote_file\n"; # No other option, really. 185 186 $remote_file = &uri_local_to_remote($warp_path_base . ".wt.fits"); 187 print COMPMAP "$remote_file $remote_file\n"; # No other option, really. 188 189 $remote_file = &uri_local_to_remote($warp_path_base . ".mask.fits"); 190 print COMPMAP "$remote_file $remote_file\n"; # No other option, really. 191 192 $remote_file = &uri_local_to_remote($warp_path_base . ".cmf"); 193 print COMPMAP "$remote_file $remote_file\n"; # No other option, really. 194 195 $remote_file = &uri_local_to_remote($warp_path_base . ".psf"); 196 print COMPMAP "$remote_file $remote_file\n"; # No other option, really. 197 198 } 173 199 } 174 200 -
branches/eam_branches/ipp-20150112/ippScripts/scripts/sc_remote_exec.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20150112/ippScripts/scripts/skycalibration.pl
r35195 r38054 235 235 $command .= " -dumpconfig $configuration" if $configuration; 236 236 $command .= " -tracedest $traceDest"; 237 $command .= " -dbname $dbname" if defined $dbname; 237 238 238 239 unless ($no_op) { -
branches/eam_branches/ipp-20150112/ippScripts/scripts/stack_bkg_mk_mdc.pl
r37738 r38054 12 12 13 13 14 my ($dbname,$stack_id,$ label,$camera,$filter);14 my ($dbname,$stack_id,$sass_id,$label,$camera,$filter); 15 15 16 16 my $ipprc = PS::IPP::Config->new(); # IPP Configuration … … 21 21 GetOptions( 22 22 'stack_id=s' => \$stack_id, 23 'sass_id=s' => \$sass_id, 23 24 'label=s' => \$label, 24 25 'filter=s' => \$filter, … … 26 27 'camera=s' => \$camera, 27 28 ) or pod2usage ( 2 ); 28 pod2usage( -msg => "Required options; --stack_id | --label ", -exitval => 3) unless29 pod2usage( -msg => "Required options; --stack_id | --label | --sass_id", -exitval => 3) unless 29 30 ((defined $stack_id)||(defined $label)); 30 31 pod2usage( -msg => "Required options; --camera --dbname ", -exitval => 3) unless … … 49 50 50 51 51 my $query = "SELECT DISTINCT chip_id,cam_id,path_base FROM stackRun JOIN stackInputSkyfile USING(stack_id) JOIN warpRun USING(warp_id) JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN camProcessedExp USING(cam_id) JOIN chipRun USING (chip_id) WHERE 1 ";52 my $query = "SELECT DISTINCT chip_id,cam_id,path_base FROM stackRun JOIN stackInputSkyfile USING(stack_id) JOIN stackAssociationMap USING(stack_id) JOIN warpRun USING(warp_id) JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN camProcessedExp USING(cam_id) JOIN chipRun USING (chip_id) WHERE 1 "; 52 53 53 54 if (defined($label)) { $query .= " AND stackRun.label = '${label}' "; } 54 55 if (defined($stack_id)) { $query .= " AND stack_id = ${stack_id} "; } 55 56 if (defined($filter)) { $query .= " AND stackRun.filter = '${filter}' "; } 57 if (defined($sass_id)) { $query .= " AND sass_id = ${sass_id} "; } 56 58 57 59 my $cams = $db->selectall_arrayref( $query ); -
branches/eam_branches/ipp-20150112/ippScripts/scripts/staticsky.pl
r36441 r38054 48 48 print " --outroot (root) : Output root name\n"; 49 49 print " --reduction (class) : Reduction class\n"; 50 print " --require_sources : Require that the stack source files exist\n"; 50 51 print " --verbose : Be extra verbose\n"; 51 52 print " --no-update : Don't update the database?\n"; … … 60 61 print "run staticsky.pl @ARGV\n"; 61 62 62 my ($sky_id, $camera, $dbname, $threads, $outroot, $reduction, $ verbose, $no_update, $no_op, $redirect, $save_temps);63 my ($sky_id, $camera, $dbname, $threads, $outroot, $reduction, $require_sources, $verbose, $no_update, $no_op, $redirect, $save_temps); 63 64 GetOptions( 64 65 'sky_id=s' => \$sky_id, # Diff identifier … … 68 69 'outroot=s' => \$outroot, # Output root name 69 70 'reduction=s' => \$reduction, # Reduction class 71 'require_sources' => \$require_sources, # Require that the stack sources exist. 70 72 'verbose' => \$verbose, # Print to stdout 71 73 'no-update' => \$no_update, # Don't update the database? … … 178 180 &my_die("Couldn't find input: $psfCnv", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$psfCnv"); 179 181 } 180 &my_die("Couldn't find input: $sources", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$sources"); 181 182 183 my $have_sources = $ipprc->file_exists("$sources"); 184 if ($require_sources) { 185 &my_die("Couldn't find input: $sources", $sky_id, $PS_EXIT_SYS_ERROR) unless $have_sources; 186 } 187 182 188 print $listFile " STACK_ID S64 " . $stack_id . "\n"; 183 189 print $listFile " RAW:IMAGE STR " . $imageRaw . "\n"; … … 185 191 print $listFile " RAW:VARIANCE STR " . $weightRaw . "\n"; 186 192 print $listFile " RAW:EXPNUM STR " . $expnumRaw . "\n"; 187 print $listFile " SOURCES STR " . $sources . "\n"; 193 if ($have_sources) { 194 print $listFile " SOURCES STR " . $sources . "\n"; 195 } 188 196 if ($needConvolvedImages) { 189 197 print $listFile " CNV:IMAGE STR " . $imageCnv . "\n";
Note:
See TracChangeset
for help on using the changeset viewer.
