IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 19, 2006, 5:57:04 PM (20 years ago)
Author:
Paul Price
Message:

Adding check for output file, and corrected name for database update.

File:
1 edited

Legend:

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

    r8487 r8853  
    2828my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
    2929
     30my $outName = $output . '.' . $classId . '.fit'; # Output file name
     31
    3032# Run ppArith
    3133my $norms;
     
    3436    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    3537        run(command => $command, verbose => 1);
    36     die "Unable to perform ppArith: $error_code\n"
    37         if not $success;
     38    die "Unable to perform ppArith: $error_code\n" if not $success;
     39    die "Can't find expected output file: $outName\n" if not -e $outName;
    3840}
     41
    3942
    4043# Update the database
    4144{
    42     my $command = "$dettool -addnormalizedimfile -det_id $detId -iter $iter -class_id $classId ".
    43         "-uri $output"; # Command to run
     45    my $command = "$dettool -addnormalizedimfile -det_id $detId -iteration $iter -class_id $classId ".
     46        "-uri $outName"; # Command to run
    4447    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    4548        run(command => $command, verbose => 1);
Note: See TracChangeset for help on using the changeset viewer.