IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 31, 2011, 2:51:48 PM (15 years ago)
Author:
eugene
Message:

merging changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/ippScripts/scripts/magic_destreak.pl

    r30102 r30446  
    6565           'cam_reduction=s'=> \$cam_reduction,  # reduction class from camera stage (for chip and raw)
    6666           'outroot=s'      => \$outroot,     # "directory" for temporary images (may be nebulous)
    67            'recoveryroot=s' => \$recoveryroot,# "directory" for saving the images of excised pixels
     67           'recoveryroot=s' => \$recoveryroot,# "prefix" for saving the images of excised pixels
    6868           'replace=s'      => \$replace,    # replace the input images with the results.
    6969           'magicked=s'     => \$magicked,   # magicked state of the run
     
    190190my $recovery_path_base;
    191191if ($recoveryroot) {
    192     if (!inNebulous($recoveryroot)) {
    193         if (! -e $recoveryroot ) {
    194             my $code = system "mkdir -p $recoveryroot";
    195             &my_die("cannot create output directory $recoveryroot", $magic_ds_id, $component,
    196                     $code >> 8) if $code;
    197         }
    198     }
    199     # note: trailing / is necessary
    200     $recovery_path_base = "$recoveryroot/$basename/";
     192    # recoveryroot is a path to prepend to the basenames of the input files
     193    if (inNebulous($recoveryroot)) {
     194        # if recoveryroot is a nebulous path we ignore the actual path and put the files in the
     195        # the same "directory" as the input files
     196        $recoveryroot = "$dirname/REC_";
     197        $recovery_path_base = $recoveryroot . $basename;
     198    } else {
     199        # otherwise we put the files in recoveryroot.
     200        # Regardless, we prefix the basename with 'REC_'
     201        $ipprc->outroot_prepare($recoveryroot);
     202        $recovery_path_base = "$recoveryroot/REC_$basename";
     203    }
    201204}
    202205
     
    601604    $command   .= " -magic_ds_id $magic_ds_id";
    602605    $command   .= " -component $component";
     606    $command .= " -backup_path_base $backup_path_base" if $backup_path_base;
     607    $command .= " -recovery_path_base $recovery_path_base" if $recovery_path_base;
    603608    $command   .= " -fault $exit_code";
    604609    $command   .= " -dbname $dbname" if defined $dbname;
Note: See TracChangeset for help on using the changeset viewer.