Changeset 28096 for trunk/ippScripts/scripts/staticsky.pl
- Timestamp:
- May 25, 2010, 3:05:00 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/staticsky.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/staticsky.pl
r28092 r28096 21 21 use PS::IPP::Metadata::List qw( parse_md_list ); 22 22 use Data::Dumper; 23 use File::Temp qw( tempfile ); 24 use File::Basename; 23 25 use PS::IPP::Config 1.01 qw( :standard ); 24 26 … … 36 38 } 37 39 38 my ($sky_id, $ dbname, $threads, $outroot, $reduction, $inverse, $run_state, $verbose, $no_update, $no_op, $redirect, $save_temps);40 my ($sky_id, $camera, $dbname, $threads, $outroot, $reduction, $inverse, $run_state, $verbose, $no_update, $no_op, $redirect, $save_temps); 39 41 GetOptions( 40 42 'sky_id=s' => \$sky_id, # Diff identifier 43 'camera|c=s' => \$camera, # Camera name 41 44 'dbname|d=s' => \$dbname, # Database name 42 45 'threads=s' => \$threads, # Number of threads to use … … 53 56 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 54 57 pod2usage( 55 -msg => "Required options: --sky_id --outroot ",58 -msg => "Required options: --sky_id --outroot --camera (--run_state)", 56 59 -exitval => 3, 57 60 ) unless 58 61 defined $sky_id and 59 defined $outroot ;60 61 my $ipprc = PS::IPP::Config->new() or my_die( "Unable to set up", $sky_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration 62 63 # XXX camera is not known here; cannot use filerules... 64 # my $logDest = $ipprc->filename("LOG.EXP", $outroot); 65 my $logDest = "$outroot.log";66 $logDest .= ".update" if $run_state eq "update";62 defined $outroot and 63 defined $camera; 64 # and defined $run_state; 65 66 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $sky_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration 67 68 my $logDest = $ipprc->filename("LOG.EXP", $outroot); 69 # $logDest .= ".update" if $run_state eq "update"; 67 70 $ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $sky_id, $PS_EXIT_SYS_ERROR ) if $redirect; 68 71 69 my $source_id = $ipprc->source_id($dbname, $PS_TABLE_ID_DIFF);72 # my $source_id = $ipprc->source_id($dbname, $PS_TABLE_ID_STATICSKY); 70 73 71 74 my $outbase = basename($outroot); … … 91 94 } 92 95 93 # XXX do we NEED to define the camera?94 # &my_die("Unable to identify camera", $sky_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless defined $camera;95 # $ipprc->define_camera($camera);96 97 96 # generate the input 98 97 print $listFile "INPUT MULTI\n"; 98 my $nInputs = @$files; 99 99 100 100 foreach my $file (@$files) { … … 103 103 # XXX if we take the input from 'warp', we will need to make different selections here 104 104 my $path_base = $file->{path_base}; 105 print "input: $path_base\n"; 106 105 107 my $imageCnv = $ipprc->filename("PPSTACK.OUTPUT", $path_base ); # Image name 106 108 my $maskCnv = $ipprc->filename("PPSTACK.OUTPUT.MASK", $path_base ); # Mask name … … 235 237 # if ($run_state eq 'new') { 236 238 $command .= " -addresult -path_base $outroot"; 239 $command .= " -num_inputs $nInputs"; 237 240 $command .= " $cmdflags"; 238 241 $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
Note:
See TracChangeset
for help on using the changeset viewer.
