IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 26, 2007, 11:57:00 AM (19 years ago)
Author:
Paul Price
Message:

Don't need --camera from the command line because it can come through the query.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/stack_skycell.pl

    r12053 r12056  
    3434use Pod::Usage qw( pod2usage );
    3535
    36 my ($stack_id, $camera, $dbname, $workdir, $no_update, $no_op);
     36my ($stack_id, $dbname, $workdir, $no_update, $no_op);
    3737GetOptions(
    3838    'stack_id|d=s'      => \$stack_id, # Stack identifier
    39     'camera|c=s'        => \$camera, # Camera name
    4039    'dbname|d=s'        => \$dbname, # Database name
    4140    'workdir|w=s'       => \$workdir,   # Working directory, for output files
     
    4645pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    4746pod2usage(
    48     -msg => "Required options: --stack_id --camera",
     47    -msg => "Required options: --stack_id",
    4948    -exitval => 3,
    50 ) unless defined $stack_id
    51     and defined $camera;
    52 
    53 $ipprc->define_camera($camera);
     49          ) unless defined $stack_id;
    5450
    5551# Look for programs we need
     
    8783my $inputList;                  # List of input files
    8884my $skycell_id;                 # Skycell identifier
     85my $camera;                     # Camera
    8986foreach my $file (@$files) {
    9087    my $uri = $ipprc->convert_filename_absolute( $file->{uri} ); # URI for file
     
    9693        $skycell_id = $file->{skycell_id};
    9794    }
    98 }
     95    if (defined $camera) {
     96        &my_die("Cameras don't match", $stack_id, $PS_EXIT_SYS_ERROR) unless $file->{camera} eq $camera;
     97    } else {
     98        $camera = $file->{camera};
     99    }
     100}
     101$ipprc->define_camera($camera);
     102
    99103
    100104### Working directory
Note: See TracChangeset for help on using the changeset viewer.