Changeset 2054 in Sophya for trunk/ArchTOIPipe/ProcWSophya
- Timestamp:
- Jun 11, 2002, 7:14:26 PM (23 years ago)
- Location:
- trunk/ArchTOIPipe/ProcWSophya
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/ProcWSophya/simcleaner.cc
r2048 r2054 20 20 SetCleanForMeanThrNSig(); 21 21 SetFlaggingThrNSig(); 22 22 23 23 SetRange(); 24 SetFlagMask(); 25 24 26 FillMeanSigNTuple(); 25 27 char* noms[] = {"sn","mean","sigma"}; … … 29 31 totnbblock = 0; 30 32 ns_outofrange = ns_flag1p = ns_flag2p = ns_flag1m = ns_flag2m = 0; 33 ns_inflagged = 0; 34 ns_cleannsig = 0; 31 35 gl_sum = gl_sum2 = 0.; ns_glms = 0; 32 36 } … … 51 55 TOIProcessor::PrintStatus(os); 52 56 os << " ProcessedSampleCount=" << ProcessedSampleCount() 57 << " NS_InFlagged= " << ns_inflagged 53 58 << " NS_OutOfRange= " << ns_outofrange 59 << " NS_CleanNSig= " << ns_cleannsig << endl 54 60 << " NS_Flag1(+)= " << ns_flag1p << " NS_Flag2(+)= " << ns_flag2p 55 61 << " NS_Flag1(-)= " << ns_flag1m << " NS_Flag2(-)= " << ns_flag2m << endl; … … 131 137 double cleanthrmin = range_min; 132 138 double cleanthrmax = range_max; 133 if ((kb > 0) && ( ns_glms > wsize/2) ) {139 if ((kb > mNbW/2) && ( ns_glms > 3*wsize) ) { 134 140 cleanthrmin = cur_mean-nsigclean*cur_sig; 135 141 cleanthrmax = cur_mean+nsigclean*cur_sig; … … 137 143 for(j=0; j<wsize; j++) { 138 144 double x = vin(j); 145 if ((vfg(j)&flag_mask)) { ns_inflagged++; continue; } 139 146 if ((x > range_max) || (x < range_min) ) continue; 140 if ((x > cleanthrmax) || (x < cleanthrmin) ) continue; 147 if ((x > cleanthrmax) || (x < cleanthrmin) ) { 148 ns_cleannsig++; 149 continue; 150 } 141 151 sum += x; sum2 += x*x; nok++; 142 152 } … … 295 305 if (fgout) for(j=0; j<wsize; j++) { 296 306 double x = vinc(j); 307 if ((vfgc(j)&flag_mask)) ns_inflagged++; 297 308 if ((x > range_max) || (x < range_min) ) { 298 309 ns_outofrange++; vfgc(j) |= FlgToiOut; -
trunk/ArchTOIPipe/ProcWSophya/simcleaner.h
r2048 r2054 40 40 inline void GetRange(double& min, double& max) const 41 41 { min = range_min; max = range_max; } 42 inline void SetCleanForMeanThrNSig(double ns=3.) 42 inline void SetFlagMask(uint_8 mask = 0) // Aucun flag utilise par defaut 43 { flag_mask = mask; } 44 inline uint_8 GetFlagMask() { return flag_mask; } 45 46 inline void SetCleanForMeanThrNSig(double ns=5.) 43 47 { nsigclean = ns; } 44 48 inline double GetCleanForMeanThrNSig() … … 75 79 int min_npt2; // Min NPoints a += nsig2 76 80 double range_min, range_max; // Range acceptable pour in 81 uint_8 flag_mask; // mask de flag utilise 82 int_4 ns_inflagged; // Nb d'echantillons flagges 83 77 84 int_4 ns_outofrange; // Nb de points out of range 85 int_4 ns_cleannsig; // Nb de points nettoyes a +/- nsigclean 78 86 int_4 ns_flag1p; // Nb de points flagges avec nsig1 (> mean) 79 87 int_4 ns_flag2p; // Nb de points flagges avec nsig2 (> mean) -
trunk/ArchTOIPipe/ProcWSophya/toi2map.cc
r2012 r2054 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: toi2map.cc,v 1.2 5 2002-05-16 20:39:52ansari Exp $5 // $Id: toi2map.cc,v 1.26 2002-06-11 17:14:25 ansari Exp $ 6 6 7 7 #include "machdefs.h" … … 194 194 195 195 int_4 ipix = mMap->PixIndexSph(theta,phi); 196 if ((ipix < 0) || (ipix >= mMap->NbPixels()) ) continue; 196 197 (*mMap)(ipix) += bolo; 197 198 ((*mWMap)(ipix)) += 1;
Note:
See TracChangeset
for help on using the changeset viewer.