IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 26, 2007, 11:45:15 AM (19 years ago)
Author:
Paul Price
Message:

Adding module, cleaning up.

File:
1 edited

Legend:

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

    r12021 r12053  
    1616use PS::IPP::Metadata::Config;
    1717use PS::IPP::Metadata::Stats;
     18use PS::IPP::Metadata::List qw( parse_md_list );
    1819use Data::Dumper;
    1920
     
    6162}
    6263
    63 # Get list of components for subtraction
     64# Get list of components for stacking
    6465my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
    6566my $files;
    6667{
    67     my $command = "$stacktool -inputscfile -stack_id $stack_id";
     68    my $command = "$stacktool -inputskyfile -stack_id $stack_id";
    6869    $command .= " -dbname $dbname" if defined $dbname;
    6970    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    7172    unless ($success) {
    7273        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    73         &my_die("Unable to perform stacktool -inputscfile: $error_code", $stack_id, $error_code);
     74        &my_die("Unable to perform stacktool -inputskyfile: $error_code", $stack_id, $error_code);
    7475    }
    7576
     
    8384    scalar @$files >= 2;
    8485
    85 # Identify the input and the template
     86# Parse the list of input files, and get the skycell identifier
    8687my $inputList;                  # List of input files
    8788my $skycell_id;                 # Skycell identifier
     
    106107
    107108# Get the output filenames
    108 my $outputFile = "$skycell_id.sub.$stack_id"; # Root name
     109my $outputFile = "$skycell_id.stack.$stack_id"; # Root name
    109110my $outputRoot = File::Spec->catfile( $workdir, $outputFile );
    110111
    111112my $outputName = $outputRoot . ".fits";
    112 my $bin1Name =  $ipprc->filename("PPIMAGE.BIN1", $outputRoot);
    113 my $bin2Name =  $ipprc->filename("PPIMAGE.BIN2", $outputRoot);
     113#my $bin1Name =  $ipprc->filename("PPIMAGE.BIN1", $outputRoot);
     114#my $bin2Name =  $ipprc->filename("PPIMAGE.BIN2", $outputRoot);
    114115my $outputStats = $outputRoot . '.stats';
    115116
    116 # Perform subtraction
     117# Perform stacking
    117118my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser
    118119unless ($no_op) {
     
    150151unless ($no_update) {
    151152
    152     # Add the subtraction result
     153    # Add the stack result
    153154    {
    154         my $command = "$stacktool -addsumscfile -stack_id $stack_id -uri $outputName -b1_uri $outputRoot";
     155        my $command = "$stacktool -addsumskyfile -stack_id $stack_id -uri $outputName"; # -b1_uri $outputRoot";
    155156        $command .= " -bg $bg -bg_stdev $bg_stdev";
    156157        $command .= " -dbname $dbname" if defined $dbname;
     
    160161        unless ($success) {
    161162            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    162             &my_die("Unable to perform stacktool -adddiffscfile: $error_code", $stack_id, $error_code);
     163            &my_die("Unable to perform stacktool -addsumskyfile: $error_code", $stack_id, $error_code);
    163164        }
    164165       
Note: See TracChangeset for help on using the changeset viewer.