IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14239


Ignore:
Timestamp:
Jul 16, 2007, 2:23:28 PM (19 years ago)
Author:
Paul Price
Message:

Putting in new stats parsing.

Location:
trunk/ippScripts/scripts
Files:
2 edited

Legend:

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

    r13748 r14239  
    4747    -exitval => 3,
    4848          ) unless defined $diff_id;
     49
     50my $STATS =
     51   [   
     52       #          PPSTATS KEYWORD         STATISTIC          DIFFTOOL FLAG
     53       { name => "ROBUST_MEDIAN",  type => "mean",  flag => "-bg",             dtype => "float" },
     54       { name => "ROBUST_STDEV",   type => "rms",   flag => "-bg_stdev",       dtype => "float" },
     55   ];
     56my $stats = PS::IPP::Metadata::Stats->new($STATS); # Stats parser
    4957
    5058# Look for programs we need
     
    141149
    142150# Perform subtraction
    143 my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser
    144151unless ($no_op) {
    145152    my $command = "$ppSub $input $template $outputRoot";
     
    171178}
    172179
    173 # Add the processed file to the database
    174 my $bg = ($stats->bg_mean() or 'NAN');
    175 my $bg_stdev = ($stats->bg_stdev() or 'NAN');
    176 
    177180unless ($no_update) {
    178181
     
    180183    {
    181184        my $command = "$difftool -adddiffskyfile -diff_id $diff_id -uri $outputName -path_base $outputRoot";
    182         $command .= " -bg $bg -bg_stdev $bg_stdev";
     185        $command .= $stats->cmdflags();
    183186        $command .= " -dbname $dbname" if defined $dbname;
    184187       
  • trunk/ippScripts/scripts/stack_skycell.pl

    r13989 r14239  
    4848    -exitval => 3,
    4949          ) unless defined $stack_id;
     50
     51my $STATS =
     52   [   
     53       #          PPSTATS KEYWORD         STATISTIC          STACKTOOL FLAG
     54       { name => "ROBUST_MEDIAN",  type => "mean",  flag => "-bg",             dtype => "float" },
     55       { name => "ROBUST_STDEV",   type => "rms",   flag => "-bg_stdev",       dtype => "float" },
     56   ];
     57my $stats = PS::IPP::Metadata::Stats->new($STATS); # Stats parser
    5058
    5159# Look for programs we need
     
    141149
    142150# Perform stacking
    143 my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser
    144151unless ($no_op) {
    145152    my $command = "$ppStack $listName $outputRoot";
     
    169176}
    170177
    171 # Add the processed file to the database
    172 my $bg       = $stats->bg_mean();
    173 my $bg_stdev = $stats->bg_stdev();
    174 
    175178unless ($no_update) {
    176179
     
    178181    {
    179182        my $command = "$stacktool -addsumskyfile -stack_id $stack_id -uri $outputName -path_base $outputRoot";
    180         $command .= " -bg $bg -bg_stdev $bg_stdev";
     183        $command .= $stats->cmdflags();
    181184        $command .= " -dbname $dbname" if defined $dbname;
    182185       
Note: See TracChangeset for help on using the changeset viewer.