Changeset 9458
- Timestamp:
- Oct 10, 2006, 9:16:22 AM (20 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 2 edited
-
detrend_reject_exp.pl (modified) (3 diffs)
-
detrend_reject_imfile.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_reject_exp.pl
r9457 r9458 98 98 my $meanStats = Statistics::Descriptive::Sparse->new(); # Statistics calculator 99 99 $meanStats->add_data(@means); 100 my $variance stats = Statistics::Descriptive::Sparse->new(); # Statistics calculator101 $variance stats->add_data(@variances);100 my $varianceStats = Statistics::Descriptive::Sparse->new(); # Statistics calculator 101 $varianceStats->add_data(@variances); 102 102 my $meanStdevStats = Statistics::Descriptive::Sparse->new(); # Statistics calculator 103 103 $meanStdevStats->add_data(@meanStdevs); … … 112 112 113 113 # rejections based on comparison with ensemble statistics 114 ## these should probably be 3-sigma clipped statistics themselves... 114 115 my $mean = $meanStats->mean(); 115 116 my $meanStdev = $meanStats->standard_deviation(); 116 117 if (not defined $meanStdev) { $meanStdev = 0; } 117 118 118 my $var = $variances->mean(); 119 my $varStdev = $variances->standard_deviation(); 119 my $var = $varianceStats->mean(); 120 my $varStdev = $varianceStats->standard_deviation(); 121 122 print "Ensemble mean $mean +/- $meanStdev, stdev " . sqrt($var) . " +/- " . sqrt($varStdev) . "\n\n"; 120 123 121 124 # Go through again to do rejection, and update the database for each exposure … … 143 146 print "no rejection for exposure mean\n"; 144 147 } 145 if ( defined REJECT_STDEV->{$det_type} && ($varStdev >0)) {146 my $nSigma = abs($var [$i] - $var) / $varStdev;148 if (REJECT_STDEV->{$det_type} && ($varStdev > 0)) { 149 my $nSigma = abs($variances[$i] - $var) / $varStdev; 147 150 if ($nSigma > REJECT_STDEV->{$det_type}) { 148 151 print "Rejecting $expTag based on outlier stdev: " . 149 sqrt($variances[$i]) " is $nSigma vs " . REJECT_STDEV->{$det_type} . "\n";152 sqrt($variances[$i]) . " is $nSigma vs " . REJECT_STDEV->{$det_type} . "\n"; 150 153 $reject = 1; 151 154 goto UPDATE; -
trunk/ippScripts/scripts/detrend_reject_imfile.pl
r9457 r9458 64 64 # This measures how much variation there is in each imfile 65 65 use constant REJECT_IMFILE_STDEV => { 66 'bias' => 0, # Should be fairly flat; some CRs66 'bias' => 15, # Should be fairly flat; some CRs 67 67 'dark' => 0, # Lots of CRs 68 68 'shutter' => undef, # Can be significant structure … … 82 82 # This measures how much variation there is across the imfiles 83 83 use constant REJECT_EXPOSURE_STDEV => { 84 'bias' => 0, # Should be little variation between chips84 'bias' => 15, # Should be little variation between chips 85 85 'dark' => 0, # Could be some glow on some chips 86 86 'shutter' => undef, # Can be significant structure
Note:
See TracChangeset
for help on using the changeset viewer.
