Changeset 25072 for trunk/ippScripts/scripts/publish_file.pl
- Timestamp:
- Aug 14, 2009, 10:36:13 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/publish_file.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/publish_file.pl
r24957 r25072 39 39 40 40 # Parse the command-line arguments 41 my ( $pub_id, $ exp_id, $camera, $stage, $stage_id, $format, $product, $workdir );41 my ( $pub_id, $camera, $stage, $stage_id, $format, $product, $workdir ); 42 42 my ( $dbname, $verbose, $no_update, $save_temps, $redirect ); 43 43 44 44 GetOptions( 45 45 'pub_id=s' => \$pub_id, # Publish identifier 46 'exp_id=s' => \$exp_id, # Exposure identifier47 46 'camera=s' => \$camera, # Camera name 48 47 'stage=s' => \$stage, # Stage of interest … … 58 57 59 58 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 60 pod2usage( -msg => "Required options: --pub_id -- exp_id --camera --stage --stage_id --product --workdir",59 pod2usage( -msg => "Required options: --pub_id --camera --stage --stage_id --product --workdir", 61 60 -exitval => $PS_EXIT_CONFIG_ERROR) unless 62 61 defined $pub_id and 63 defined $exp_id and64 62 defined $camera and 65 63 defined $product and … … 68 66 defined $workdir; 69 67 70 my $outroot = "$workdir/$product.$pub_id .$exp_id"; # Output root name68 my $outroot = "$workdir/$product.$pub_id"; # Output root name 71 69 72 70 my $ipprc = PS::IPP::Config->new( $camera ) or … … 83 81 my %files; # Input filenames 84 82 my %zp; # Zero points 83 my %exp_id; # Exposure identifiers 85 84 { 86 85 my $command; # Command to run … … 119 118 $zp{"$skycell_id.pos"} = $zp; 120 119 $zp{"$skycell_id.neg"} = $zp if defined $comp->{bothways} and $comp->{bothways}; 120 $exp_id{"$skycell_id.pos"} = $comp->{exp1}; 121 $exp_id{"$skycell_id.neg"} = $comp->{exp2} if defined $comp->{bothways} and $comp->{bothways}; 121 122 } elsif ($stage eq 'camera') { 122 123 my $cam_id = $comp->{cam_id}; 123 124 $files{$cam_id} = $ipprc->filename( "PSASTRO.OUTPUT", $path_base ); 124 125 $zp{$cam_id} = $zp; 126 $exp_id{$cam_id} = $comp->{exp_id}; 125 127 } 126 128 } … … 137 139 138 140 my $zp = $zp{$comp}; 141 my $exp_id = $exp_id{$comp}; 139 142 if ($product eq "IPP-MOPS") { 140 143 my $outuri = "$outroot.$comp.fits"; … … 142 145 &my_die( "Unable to resolve output file $outuri", $pub_id, $PS_EXIT_SYS_ERROR); 143 146 144 my $command = "$ppMops $file $zp $ out";147 my $command = "$ppMops $file $zp $exp_id $out"; 145 148 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 146 149 run(command => $command, verbose => $verbose);
Note:
See TracChangeset
for help on using the changeset viewer.
