IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9257


Ignore:
Timestamp:
Oct 4, 2006, 1:48:59 PM (20 years ago)
Author:
Paul Price
Message:

Adding path support.

File:
1 edited

Legend:

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

    r9102 r9257  
    1111use PS::IPP::Metadata::List qw( parse_md_list );
    1212use Statistics::Descriptive;
     13
     14use PS::IPP::Config;
     15my $ipprc = PS::IPP::Config->new(); # IPP configuration
     16use File::Spec;
    1317
    1418use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
     
    96100}
    97101
     102my $example = ${$files}[0]->{b1_uri}; # Example file
     103my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     104
    98105# Generate the file list, and get the statistics
    99106my $outputRoot = $exp_tag . '.detresid.' . $det_id . '.' . $iter; # Root output name
     107$outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() );
    100108my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1
    101109my $list2Name = $outputRoot . '.b2.list'; # Name for the input file list for binning 2
     
    105113open my $list2File, '>' . $list2Name;
    106114foreach my $file (@$files) {
    107     print $list1File $file->{b1_uri} . "\n";
    108     print $list2File $file->{b2_uri} . "\n";
     115    print $list1File File::Spec->rel2abs( $file->{b1_uri}, $ipprc->workdir() ) . "\n";
     116    print $list2File File::Spec->rel2abs( $file->{b2_uri}, $ipprc->workdir() ) . "\n";
    109117    push @means, $file->{bg};
    110118    push @stdevs, $file->{bg_stdev};
     
    194202
    195203# Add the result into the database
     204$jpeg1Name = File::Spec->abs2rel( $jpeg1Name, $ipprc->workdir() );
     205$jpeg2Name = File::Spec->abs2rel( $jpeg2Name, $ipprc->workdir() );
    196206unless ($no_update) {
    197207    my $command = "$dettool -addresidexp -det_id $det_id -iteration $iter -exp_tag $exp_tag " .
     
    202212        run(command => $command, verbose => 1);
    203213    die "Unable to perform dettool -addresidexp: $error_code\n" if not $success;
     214
     215    unlink $list1Name;
     216    unlink $list2Name;
    204217}
    205218
Note: See TracChangeset for help on using the changeset viewer.