IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 7, 2006, 10:38:05 AM (20 years ago)
Author:
Paul Price
Message:

Output images from ppImage are specified by the FILERULES in the camera configuration.

File:
1 edited

Legend:

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

    r9446 r9892  
    2121    $classId,                   # Class Id
    2222    $input,                     # Input FITS file
     23    $camera,                    # Camera
    2324    $no_update                  # Don't update the database?
    2425    );
     
    2728    'class_id|i=s'  => \$classId,
    2829    'uri|u=s'       => \$input,
     30    'camera|c=s'    => \$camera,
    2931    'no-update'     => \$no_update
    3032) or pod2usage( 2 );
     
    3234pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    3335pod2usage(
    34     -msg => "Required options: --exp_tag --class_id --uri",
     36    -msg => "Required options: --exp_tag --class_id --uri --camera",
    3537    -exitval => 3,
    3638) unless defined $expTag
    3739    and defined $classId
    38     and defined $input;
     40    and defined $input
     41    and defined $camera;
     42
     43$ipprc->define_camera($camera);
    3944
    4045# Look for programs we need
     
    4954$outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() );
    5055$input = File::Spec->rel2abs( $input, $ipprc->workdir() );
    51 my $outputImage = $outputRoot  . '.' . $classId . '.fits';
     56my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $classId);
     57my $outputBin1 = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $classId);
     58my $outputBin2 = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $classId);
    5259my $outputStats = $outputRoot  . '.' . $classId . '.stats';
    53 my $outputBin1Name = $outputRoot . '.' . $classId . '.b1.fits';
    54 my $outputBin2Name = $outputRoot . '.' . $classId . '.b2.fits';
    5560
    5661# Run ppImage
     
    6267    die "Unable to perform ppImage on $input: $error_code\n" if not $success;
    6368    die "Couldn't find expected output file: $outputImage\n" if not -f $outputImage;
    64     die "Couldn't find expected output file: $outputBin1Name\n" if not -f $outputBin1Name;
    65     die "Couldn't find expected output file: $outputBin2Name\n" if not -f $outputBin2Name;
     69    die "Couldn't find expected output file: $outputBin1\n" if not -f $outputBin1;
     70    die "Couldn't find expected output file: $outputBin2\n" if not -f $outputBin2;
    6671    die "Couldn't find expected output file: $outputStats\n" if not -f $outputStats;
    6772}
     
    8388# Add the processed file to the database
    8489$outputImage = File::Spec->abs2rel( $outputImage, $ipprc->workdir() );
    85 $outputBin1Name = File::Spec->abs2rel( $outputBin1Name, $ipprc->workdir() );
    86 $outputBin2Name = File::Spec->abs2rel( $outputBin2Name, $ipprc->workdir() );
     90$outputBin1 = File::Spec->abs2rel( $outputBin1, $ipprc->workdir() );
     91$outputBin2 = File::Spec->abs2rel( $outputBin2, $ipprc->workdir() );
    8792unless ($no_update) {
    8893    # Command to run dettool
     
    9297    $command .= " -recip " . RECIPE;
    9398    $command .= " -uri $outputImage";
    94     $command .= " -b1_uri $outputBin1Name";
    95     $command .= " -b2_uri $outputBin2Name";
     99    $command .= " -b1_uri $outputBin1";
     100    $command .= " -b2_uri $outputBin2";
    96101    $command .= " -bg " . $stats->bg_mean();
    97102    $command .= " -bg_stdev " . $stats->bg_stdev();
Note: See TracChangeset for help on using the changeset viewer.