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/phase3.pl

    r9524 r9892  
    2222GetOptions(
    2323    'exp_tag|e=s'       => \$exp_tag,
     24    'camera|c=s'        => \$camera,
    2425    'no-update'         => \$no_update
    2526) or pod2usage( 2 );
     
    2728pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    2829pod2usage(
    29     -msg => "Required options: --exp_tag",
     30    -msg => "Required options: --exp_tag --camera",
    3031    -exitval => 3,
    31 ) unless defined $exp_tag;
     32) unless defined $exp_tag
     33    and defined $camera;
     34
     35$ipprc->define_camera($camera);
    3236
    3337use constant RECIPE1 => 'PPIMAGE_J1'; # Recipe to use for ppImage to make JPEGs
     
    110114
    111115# Output products --- need to synch with the camera configuration!
    112 my $jpeg1Name = $outputRoot . ".b1.jpg"; # Binned JPEG #1
    113 my $jpeg2Name = $outputRoot . ".b2.jpg"; # Binned JPEG #2
     116my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
     117my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
    114118
    115119# Make the jpeg for binning 1
     
    118122    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    119123        run(command => $command, verbose => 1);
    120     die "Unable to find expected output file: $jpeg1Name\n" if not -f $jpeg1Name;
     124    die "Unable to find expected output file: $jpeg1\n" if not -f $jpeg1;
    121125}
    122126
     
    126130    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    127131        run(command => $command, verbose => 1);
    128     die "Unable to find expected output file: $jpeg2Name\n" if not -f $jpeg2Name;
     132    die "Unable to find expected output file: $jpeg2\n" if not -f $jpeg2;
    129133}
    130134
     
    132136# Add the result into the database
    133137$outputRoot = File::Spec->abs2rel( $outputRoot, $ipprc->workdir() );
    134 $jpeg1Name  = File::Spec->abs2rel( $jpeg1Name, $ipprc->workdir() );
    135 $jpeg2Name  = File::Spec->abs2rel( $jpeg2Name, $ipprc->workdir() );
     138$jpeg1  = File::Spec->abs2rel( $jpeg1, $ipprc->workdir() );
     139$jpeg2  = File::Spec->abs2rel( $jpeg2, $ipprc->workdir() );
    136140unless ($no_update) {
    137141    my $command = "$p3tool -addprocessedexp -exp_tag $exp_tag -uri UNKNOWN " .
    138         "-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1Name -b2_uri $jpeg2Name " .
     142        "-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1 -b2_uri $jpeg2 " .
    139143        "-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev " .
    140144        "-sigma_ra 0.0 -sigma_dec 0.0 -nastro 0 -zp_mean 0.0 -zp_stdev 0.0"; # Command to run
Note: See TracChangeset for help on using the changeset viewer.