Changeset 1963 in Sophya
- Timestamp:
- Apr 11, 2002, 6:12:17 PM (23 years ago)
- Location:
- trunk/ArchTOIPipe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/toiprocessor.cc
r1787 r1963 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: toiprocessor.cc,v 1.2 1 2001-11-26 15:13:48aubourg Exp $5 // $Id: toiprocessor.cc,v 1.22 2002-04-11 16:12:17 aubourg Exp $ 6 6 7 7 #include "toiprocessor.h" … … 167 167 throw RangeCheckError("TOIProcessor::getOutputTOI() out of bound toiIndex"); 168 168 TOI* toi = outTOIs[toiIndex]; 169 if (toi == NULL)170 throw NullPtrError("TOIProcessor::getOutputTOI() - Not assigned TOI !");169 // if (toi == NULL) 170 // throw NullPtrError("TOIProcessor::getOutputTOI() - Not assigned TOI !"); 171 171 return(toi); 172 172 } … … 392 392 void TOIProcessor::putData(int toiIndex, int i, double value, uint_8 flg) { 393 393 TOI* toi = getOutputTOI(toiIndex); 394 if (toi == NULL) return; 394 395 toi->putData(i, value, flg); 395 396 // autoWontNeed(i); // now done on getData … … 400 401 uint_8 const* flg) { 401 402 TOI* toi = getOutputTOI(toiIndex); 403 if (toi == NULL) return; 402 404 toi->putData(i, n, val, flg); 403 405 if (toi->needSyncOldWay()) notify(); // seulement pour non segmented -
trunk/ArchTOIPipe/Processors/wienerdecor.cc
r1945 r1963 16 16 declareInput("probe"); 17 17 declareOutput("signal"); 18 declareOutput("noiseestim"); 18 19 name="WienerDecorrelator"; 19 20 setNeededHistory(nsamples+lcorr+1); … … 33 34 double* y = new double[lcorr+1]; // corr vector 34 35 double* window = new double[lcorr]; 35 double* filter = w+1; 36 double* filter = new double[lcorr]; 37 for (int i=0; i<lcorr; i++) filter[i]=0; 36 38 37 39 int sn = snb; … … 57 59 } 58 60 dtoeplz(r,w,y,lcorr); 59 cout << "Wiener filter : \n "; 61 if (!isnan(w[1])) { 62 for (int i=0; i<lcorr; i++) { 63 filter[i] = w[i+1]; 64 } 65 } else { 66 cout << "Bad inversion, keeping previous filter\n"; 67 } 68 cout << "Wiener filter : " << sn << "\n "; 60 69 for (int i=0; i<lcorr; i++) { 61 70 cout << filter[i] << " "; … … 71 80 } 72 81 putData(0, sn, getData(0, sn) - outSig); 82 putData(1, sn, outSig); 73 83 } 74 84 sn++; … … 78 88 delete[] w; 79 89 delete[] r; 90 delete[] filter; 80 91 }
Note:
See TracChangeset
for help on using the changeset viewer.