IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2009, 2:19:43 PM (17 years ago)
Author:
bills
Message:

RemoveStreaks is now called DetectStreaks
Remove -D option from command line.
Add -S option to command line
return $PS_EXIT_DATA_ERROR if the input files can't be resolved

File:
1 edited

Legend:

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

    r23295 r23637  
    3030my $missing_tools;
    3131my $magictool      = can_run('magictool') or (warn "Can't find magictool" and $missing_tools = 1);
    32 my $removestreaks = can_run('RemoveStreaks') or (warn "Can't find RemoveStreaks" and $missing_tools = 1);
     32my $detectstreaks = can_run('DetectStreaks') or (warn "Can't find DetectStreaks" and $missing_tools = 1);
    3333if ($missing_tools) {
    3434    warn("Can't find required tools.");
     
    6363$ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_id, $node, $PS_EXIT_SYS_ERROR ) if $logfile;
    6464
    65 # RemoveStreaks doesn't know about nebulous. It expects to be able to append strings to outroot
     65# DetectStreaks doesn't know about nebulous. It expects to be able to append strings to outroot
    6666# to form valid file names.
    67 # So forbid nebulous path in outroot. We could relax this by change RemoveStreaks to take all
    68 # of the file names as arguments
     67# So forbid nebulous path in outroot. We could relax this by change DetectStreaks to take all
     68# of the file names as arguments or by teaching it aoubt Nebulous
    6969if ($outroot =~ 'neb:/') {
    70     &my_die("RemoveStreaks does not support nebulous paths in outroot", $magic_id, $node, $PS_EXIT_CONFIG_ERROR);
     70    &my_die("DetectStreaks does not support nebulous paths in outroot", $magic_id, $node, $PS_EXIT_CONFIG_ERROR);
    7171}
    7272
     
    100100{
    101101    my $command;                # Command to execute
    102     $command = "$removestreaks --outroot $outroot";
     102    $command = "$detectstreaks --outroot $outroot";
    103103    $command .= " --verbose" if $verbose;
    104104
    105     # added per Paul Sydney's Jan 6, 2009
    106     $command .= " -D 3";
     105    # added per Paul Sydney's request Jan 6, 2009
     106    # removed per Paul Sydney March 30, 2009
     107    # $command .= " -D 3";
    107108
    108109
     
    118119    if (scalar @$inputs == 1 and $node ne "root") {
    119120        #
    120         #  RemoveStreak --detect --image filename --mask maskname --weight weightname --outroot path_base
     121        #  DetectStreaks --detect --image filename --mask maskname --weight weightname --outroot path_base
    121122        #
    122123        # Leaf node: 'detect' stage
     
    131132        }
    132133        my ($image, $mask, $weight) = resolve_inputs($innode);
     134        if (!defined($image) or !defined($mask) or !defined($weight)) {
     135            &my_die("failed to resolve inputs", $magic_id, $node, $PS_EXIT_DATA_ERROR);
     136        }
    133137
    134138        $command .= " --detect --image $image --mask $mask --weight $weight";
    135139
    136140        # set threshold to 4 sigma
    137         $command .= ' -t 4';
     141        $command .= ' -t 4 -S';
    138142
    139143        # create the list of inputs used at this stage. At higher levels the
     
    156160    } else {
    157161        #
    158         # RemoveStreak --merge --inputs input.list --images image0_1.list \
     162        # DetectStreaks --merge --inputs input.list --images image0_1.list \
    159163        #                      --masks mask0_1.list --weight weights0_1.list
    160164        #                      --outroot outroot
     
    202206
    203207    unless ($no_op) {
    204         # RemoveStreaks fails if an output file already exists
     208        # DetectStreaks fails if an output file already exists
    205209        foreach my $output (@outputs) {
    206210            unlink($output) if -e $output;
     
    211215        unless ($success) {
    212216            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    213             &my_die("Unable to perform RemoveStreaks: $error_code", $magic_id, $node, $error_code);
     217            &my_die("Unable to perform DetectStreaks: $error_code", $magic_id, $node, $error_code);
    214218        }
    215219
Note: See TracChangeset for help on using the changeset viewer.