IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 12, 2011, 4:49:01 PM (15 years ago)
Author:
bills
Message:

changes to modernize saving the excised pixels
save backup_path_base and recovery_path_base in magicDSFile even if there is a fault.

File:
1 edited

Legend:

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

    r29995 r30259  
    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    } else {
     198        $ipprc->outroot_prepare($recoveryroot);
     199    }
     200    $recovery_path_base = $recoveryroot . $basename;
    201201}
    202202
     
    601601    $command   .= " -magic_ds_id $magic_ds_id";
    602602    $command   .= " -component $component";
     603    $command .= " -backup_path_base $backup_path_base" if $backup_path_base;
     604    $command .= " -recovery_path_base $recovery_path_base" if $recovery_path_base;
    603605    $command   .= " -fault $exit_code";
    604606    $command   .= " -dbname $dbname" if defined $dbname;
Note: See TracChangeset for help on using the changeset viewer.