IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24942


Ignore:
Timestamp:
Jul 29, 2009, 1:38:06 PM (17 years ago)
Author:
bills
Message:

if -req_name is provided allow output to be omitted and set $outpu = "$req_name.fits"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/test/pstamp_req_create

    r20257 r24942  
    2626
    2727pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    28 pod2usage( -msg => "Required options: --input --output",
    29            -exitval => 3) unless defined $input and defined $output;
     28pod2usage( -msg => "Required options: --input --output | --req_name",
     29           -exitval => 3) unless defined $input and (defined $output or defined $req_name);
    3030
    3131# The header kewords
     
    9595if ($req_name) {
    9696    $header->[0]->{value} = $req_name;
    97 }
     97} else {
     98    $req_name = $header->[0]->{value};
     99}
     100
     101die "no request name defined" unless defined $req_name;
     102
     103$output = $req_name . ".fits" if !$output;
    98104
    99105my $status = make_fits_table($output, EXTNAME, $numRows, \@colData, $columns, $header);
Note: See TracChangeset for help on using the changeset viewer.