IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 4, 2007, 4:52:03 PM (19 years ago)
Author:
Paul Price
Message:

Major upgrade to allow use of Nebulous

File:
1 edited

Legend:

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

    r12800 r13275  
    1717use PS::IPP::Metadata::List qw( parse_md_list );
    1818use Statistics::Descriptive;
    19 use File::Spec;
    20 
    21 use PS::IPP::Config qw(
    22     $PS_EXIT_SUCCESS
    23     $PS_EXIT_UNKNOWN_ERROR
    24     $PS_EXIT_SYS_ERROR
    25     $PS_EXIT_CONFIG_ERROR
    26     $PS_EXIT_PROG_ERROR
    27     $PS_EXIT_DATA_ERROR
    28     $PS_EXIT_TIMEOUT_ERROR
    29     );
     19
     20use PS::IPP::Config qw($PS_EXIT_SUCCESS
     21                       $PS_EXIT_UNKNOWN_ERROR
     22                       $PS_EXIT_SYS_ERROR
     23                       $PS_EXIT_CONFIG_ERROR
     24                       $PS_EXIT_PROG_ERROR
     25                       $PS_EXIT_DATA_ERROR
     26                       $PS_EXIT_TIMEOUT_ERROR
     27                       caturi
     28                       );
    3029my $ipprc = PS::IPP::Config->new(); # IPP configuration
    3130
     
    122121my $reject_meanstdev = rejection_limit( 'ENSEMBLE.MEANSTDEV', $det_type, $filter );
    123122
    124 my $logName = "$camera.$det_type.$det_id.$iter.detreject.log"; # Name for log
    125 if (defined $workdir) {
    126     $workdir = $ipprc->convert_filename_absolute( $workdir );
    127     my $subdir = "$camera.$det_type.$det_id";
    128     $workdir = File::Spec->catdir( $workdir, $subdir );
    129     system "mkdir -p $workdir" unless -d $workdir;
    130     $logName = File::Spec->catfile( $workdir, $logName );
    131 }
     123$workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
     124
     125my $logName = $ipprc->file_prepare( "$camera.$det_type.$det_id.$iter.detreject.log", $workdir ); # Name for log
     126
    132127my $logFile;
    133128unless ($no_op) {
    134     open $logFile, "> $logName" or &my_die("Unable to open log file $logName.\n", $det_id, $iter, $PS_EXIT_SYS_ERROR);
     129    $logFile = $ipprc->file_create_open( $logName );
    135130    print $logFile "Ensemble mean " . $meanStats->mean() . " +/- " . $meanStats->standard_deviation .
    136131        ", stdev " . $stdevStats->mean() . " +/- " . $stdevStats->standard_deviation() . "\n\n";
Note: See TracChangeset for help on using the changeset viewer.