IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18702


Ignore:
Timestamp:
Jul 23, 2008, 5:57:26 PM (18 years ago)
Author:
Paul Price
Message:

Various small fixes: tree printing, single skycells, error on bad tree.

File:
1 edited

Legend:

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

    r18696 r18702  
    6464my $missing_tools;
    6565my $magictool = can_run('magictool') or (warn "Can't find magictool" and $missing_tools = 1);
    66 my $ppImage = can_run('ppImage') or (warn "Can't find ppImage" and $missing_tools = 1);
    6766if ($missing_tools) {
    6867    warn("Can't find required tools.");
     
    9190
    9291    foreach my $input ( @$inputs ) {
    93         push @skycells, $input->{skycell_id};
     92        push @skycells, $input->{node}; # NB: Storing the skycell_id in magicInputSkyfile.node
    9493    }
    9594}
     
    177176};
    178177my @tasks = ( $root );
    179 while (scalar @tasks > 0) {
     178while (scalar @tasks > 1) {
    180179    my $node = shift @tasks;
    181180    divide_node($node, \@tasks);
     
    185184my $mdcTree = print_node($root); # The tree in MDC format
    186185my ($treeFile, $treeName) = tempfile( "magictree.${magic_id}.XXXX", UNLINK => !$save_temps );
    187 print $treeFile, $mdcTree;
     186print $treeFile $mdcTree;
    188187close $treeFile;
    189188
     
    201200        unless ($success) {
    202201            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    203             warn("Unable to perform magictool -inputtree: $error_code");
    204             exit($error_code);
     202            &my_die("Unable to perform magictool -inputtree: $error_code", $magic_id, $error_code);
    205203        }
    206204    } else {
Note: See TracChangeset for help on using the changeset viewer.