Changeset 1454 in Sophya for trunk/ArchTOIPipe/ProcWSophya/simtoipr.h
- Timestamp:
- Apr 9, 2001, 2:14:21 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/ProcWSophya/simtoipr.h
r1443 r1454 5 5 6 6 #include "toiprocessor.h" 7 #include "tvector.h" 7 8 8 9 // --------- Un deglitcheur simple … … 16 17 virtual ~SimpleDeglitcher(); 17 18 19 inline void SetRange(double min, double max) 20 { range_min = min; range_max = max; } 21 inline void GetRange(double& min, double& max) const 22 { min = range_min; max = range_max; } 23 18 24 virtual void init(); 19 25 virtual void run(); … … 23 29 inline int MaxPoints() const { return maxpoints; } 24 30 25 inline int TotalSampleCount() const { return totnscount; } 26 inline int GlitchCount() const { return glcount; } 27 inline int GlitchSampleCount() const { return glnscount; } 31 inline int_8 ProcessedSampleCount() const { return totnscount; } 32 inline int_8 GlitchCount() const { return glcount; } 33 inline int_8 GlitchSampleCount() const { return glnscount; } 34 inline int_8 OutOfRangeSampleCount() const { return out_range_nscount; } 28 35 29 36 virtual void PrintStatus(ostream & os) ; // const plus tard 30 37 31 38 protected: 32 int totnscount; // Nombre total d'echantillon processe 33 int glnscount; // Nombre total de glitch 34 int glcount; // Nombre de glitch detecte 39 int_8 totnscount; // Nombre total d'echantillon processe 40 int_8 glnscount; // Nombre total de glitch 41 int_8 glcount; // Nombre de glitch detecte 42 int_8 out_range_nscount; // Nombre de sample Out Of Range 35 43 bool deglitchdone; // Deglitch effectue 36 44 … … 38 46 double nsig; // Seuil en nb de sigmas 39 47 int maxpoints; // Nb maxi de points > ns sigmas 48 double range_min, range_max; // Range acceptable pour in 40 49 }; 41 50 … … 54 63 }; 55 64 65 static string FilterKind2String(FilterKind fk); 56 66 SimpleFilter(int wsz=128, 57 58 59 // SimpleFilter(int wsz, Arr_DoubleFunctionOfX f=NULL);67 FilterKind fk=SimpleFilter::MeanFilter, 68 double a=1., double s=1.); 69 SimpleFilter(Vector const & vc); 60 70 ~SimpleFilter(); 61 71 … … 63 73 64 74 inline int WSize() const { return wsize; } 65 inline int TotalSampleCount() const { return totnscount; } 75 inline int_8 ProcessedSampleCount() const { return totnscount; } 76 Vector FilterCoefficients() const; 66 77 67 78 virtual void PrintStatus(ostream & os) ; // const plus tard … … 72 83 protected: 73 84 FilterKind fkind; 74 int totnscount; // Nombre total d'echantillon processe85 int_8 totnscount; // Nombre total d'echantillon processe 75 86 int wsize; // Taille de fenetre de travail 76 87 double* coef; // Coefficients du filtre … … 78 89 }; 79 90 91 // Classe SimpleAdder 92 // Calcule la sortie = Somme_Entree [ coeff[num] * entree[num] ] 93 94 class SimpleAdder : public TOIProcessor { 95 public: 96 SimpleAdder(int nbinput); 97 ~SimpleAdder(); 98 99 void SetGain(int num, double g); 100 double Gain(int num); 101 102 inline int NbInput() const { return nb_input; } 103 inline int_8 ProcessedSampleCount() const { return totnscount; } 104 105 virtual void PrintStatus(ostream & os) ; // const plus tard 106 107 virtual void init(); 108 virtual void run(); 109 110 protected: 111 int nb_input; 112 Vector gains; 113 int_8 totnscount; // Nombre total d'echantillon processe 114 }; 115 116 80 117 #endif
Note:
See TracChangeset
for help on using the changeset viewer.