- Timestamp:
- Nov 12, 2015, 2:50:33 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/tools/bills/adddeltacolumns (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/bills/adddeltacolumns
r39056 r39115 46 46 # foreach my $line (<C>) { 47 47 my @deltas; 48 my @columns; 48 49 foreach my $line (@lines) { 49 50 next if $line =~ '^#'; … … 61 62 $cmd .= "addcol -after $p2 $dcol $equation;"; 62 63 push @deltas, $dcol; 64 push @columns, $p2; 63 65 } 64 66 $cmd .= "'"; … … 80 82 output /dev/null 81 83 macro checkdelta 82 \$col = \$1 84 \$dcol = \$1 85 \$col = \$2 83 86 \$thislimit = \$limit 84 \$length = \$col[] 87 set goodmask = \$col != -999 88 subset good = \$dcol where goodmask == 1 89 \$length = good[] 85 90 for i 0 10 86 subset d = \$col where abs(\$col) > \$thislimit91 subset d = good where abs(good) > \$thislimit 87 92 \$noutliers = d[] 88 93 if (\$noutliers > 0) 89 echo \$ col has \$noutliers out of \$length with difference > \$thislimit94 echo \$dcol has \$noutliers out of \$length with difference > \$thislimit 90 95 \$thislimit = \$thislimit * 10 91 96 else … … 97 102 98 103 print $manafile "\nmacro dotests\n"; 99 foreach my $col (@deltas) { 100 print $manafile " checkdelta $col\n"; 104 my $n = scalar @deltas; 105 for (my $i=0; $i < $n; $i++) { 106 my $col = $columns[$i]; 107 my $dcol = $deltas[$i]; 108 print $manafile " checkdelta $dcol $col\n"; 101 109 } 102 110 print $manafile "end\n"; … … 105 113 print $manafile "read -fits Joined"; 106 114 foreach my $col (@deltas) { 115 print $manafile " $col"; 116 } 117 print $manafile "\n"; 118 print $manafile "read -fits Joined"; 119 foreach my $col (@columns) { 107 120 print $manafile " $col"; 108 121 }
Note:
See TracChangeset
for help on using the changeset viewer.
