Changeset 1483 in Sophya for trunk/ArchTOIPipe/ProcWSophya
- Timestamp:
- Apr 30, 2001, 10:52:01 AM (24 years ago)
- Location:
- trunk/ArchTOIPipe/ProcWSophya
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/ProcWSophya/simtoipr.cc
r1479 r1483 615 615 if (wsize < 16) 616 616 throw ParmError("SimpleFourierFilter::SimpleFourierFilter() WSize<16 !"); 617 KeepSpectra( 0);617 KeepSpectra("spectra.ppf", 0); 618 618 } 619 619 … … 672 672 Vector vout(wsize); 673 673 TVector<int_8> vfg(wsize); 674 TVector< complex<r_8> > vfft ;674 TVector< complex<r_8> > vfft, vfftmean; 675 675 TVector< complex<r_8> > zcoef(ffcoef.Size()); 676 676 zcoef = ffcoef; … … 679 679 FFTPackServer ffts; 680 680 ffts.setNormalize(true); 681 // Boucle sur les sampleNum 681 682 POutPersist pout(outppfname); 682 683 683 684 int k,i,klast; 684 685 int nks = 0; 685 686 int nblk = 0; 686 687 klast = snb-1; 688 // Boucle sur les sampleNum 687 689 // 1er partie, on traite par paquets de wsize 688 690 for(k=snb;k<=sne-wsize+1;k+=wsize) { … … 690 692 getData(0, k+i, vin(i), vfg(i)); 691 693 ffts.FFTForward(vin, vfft); 694 if (nblk == 0) vfftmean = vfft; 695 else vfftmean += vfft; 696 nblk++; 692 697 if (nks < nb_keep) { 693 string dbgfile = "ffiltdbg" + (string)MuTyV(nks) + ".ppf"; 694 POutPersist po(dbgfile); 695 po << vfft; 698 TVector< complex<r_8> > vfftcopie; 699 vfftcopie = vfft; 700 string nomvfft = "spectra" + MuTyV(nks); 701 pout.PutObject(vfftcopie, nomvfft); 696 702 nks++; 697 703 } … … 719 725 totnscount++; 720 726 } 727 728 729 vfftmean /= complex<r_8>((r_8)nblk, 0.); 730 pout.PutObject(vfftmean, "meanspectra"); 731 721 732 cout << " SimpleFourierFilter::run() - End of processing " << endl; 722 733 } // Bloc try -
trunk/ArchTOIPipe/ProcWSophya/simtoipr.h
r1479 r1483 158 158 virtual void run(); 159 159 160 inline void KeepSpectra( int nb=0)161 { nb_keep = nb; }160 inline void KeepSpectra(string outname, int nb) 161 { outppfname = outname; nb_keep = nb; } 162 162 protected: 163 163 int_8 totnscount; // Nombre total d'echantillon processe … … 165 165 Vector ffcoef; // Coefficients du filtre 166 166 int nb_keep; 167 string outppfname; 167 168 }; 168 169
Note:
See TracChangeset
for help on using the changeset viewer.