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

    r9524 r9892  
    1919use Pod::Usage qw( pod2usage );
    2020
    21 my ($det_id, $exp_tag, $no_update);
     21my ($det_id, $exp_tag, $camera, $no_update);
    2222GetOptions(
    2323    'det_id|d=s'        => \$det_id,
    2424    'exp_tag|e=s'       => \$exp_tag,
     25    'camera|c=s'        => \$camera,
    2526    'no-update'         => \$no_update
    2627) or pod2usage( 2 );
     
    2829pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    2930pod2usage(
    30     -msg => "Required options: --det_id --exp_tag",
     31    -msg => "Required options: --det_id --exp_tag --camera",
    3132    -exitval => 3,
    3233) unless defined $det_id
    33     and defined $exp_tag;
     34    and defined $exp_tag,
     35    and defined $camera;
     36
     37$ipprc->define_camera($camera);
    3438
    3539use constant RECIPE1 => 'PPIMAGE_J1'; # Recipe to use for ppImage to make JPEGs
     
    105109close $list2File;
    106110
    107 # Output products --- need to synch with the camera configuration!
    108 my $jpeg1Name = $outputRoot . ".b1.jpg"; # Binned JPEG #1
    109 my $jpeg2Name = $outputRoot . ".b2.jpg"; # Binned JPEG #2
     111# Output products
     112my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
     113my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
    110114
    111115# Make the jpeg for binning 1
     
    114118    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    115119        run(command => $command, verbose => 1);
    116     die "Unable to find expected output file: $jpeg1Name\n" if not -f $jpeg1Name;
     120    die "Unable to find expected output file: $jpeg1\n" if not -f $jpeg1;
    117121}
    118122
     
    122126    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    123127        run(command => $command, verbose => 1);
    124     die "Unable to find expected output file: $jpeg2Name\n" if not -f $jpeg2Name;
     128    die "Unable to find expected output file: $jpeg2\n" if not -f $jpeg2;
    125129}
    126130
     
    128132# Add the result into the database
    129133$outputRoot = File::Spec->abs2rel( $outputRoot, $ipprc->workdir() );
    130 $jpeg1Name  = File::Spec->abs2rel( $jpeg1Name, $ipprc->workdir() );
    131 $jpeg2Name  = File::Spec->abs2rel( $jpeg2Name, $ipprc->workdir() );
     134$jpeg1  = File::Spec->abs2rel( $jpeg1, $ipprc->workdir() );
     135$jpeg2  = File::Spec->abs2rel( $jpeg2, $ipprc->workdir() );
    132136unless ($no_update) {
    133137    my $command = "$dettool -addprocessedexp -det_id $det_id -exp_tag $exp_tag " .
    134         "-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1Name -b2_uri $jpeg2Name " .
     138        "-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1 -b2_uri $jpeg2 " .
    135139        "-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev"; # Command to run
    136140    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
Note: See TracChangeset for help on using the changeset viewer.