Changeset 1962 in Sophya


Ignore:
Timestamp:
Apr 11, 2002, 6:07:44 PM (23 years ago)
Author:
lemeur
Message:

changement fft reelle en complexe, pour nombre pair d'achantillons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/NTools/FSAppIrrSmpl.cc

    r1943 r1962  
    119119void FSApproximationIrregularSampling::restaureRegularlySampledSignal(int nbInterv, TVector<double>& solution) const
    120120{
    121   if (nbInterv < 2*M_+1 || nbInterv%2 !=  0)
    122       {
    123         int k;
     121  cout << " c'est celui que je corrige " << endl;
     122  int k;
     123  if (nbInterv < 2*M_+1)
     124      {
    124125        solution.ReSize(nbInterv);
    125126        double delta = 1./nbInterv;
     
    132133    else
    133134      {
    134         int tailleTF = nbInterv/2+1;
    135         TVector<complex<double> > TFf(tailleTF);
     135        TVector<complex<double> > TFf(nbInterv);
     136        TVector<complex<double> > bidon(nbInterv);
    136137        TFf = complex<double>(0.,0.);
    137138        TFf(Range(0,M_)) = coefFourier_;
    138         fftIntfPtr_-> FFTBackward(TFf, solution);
     139        for ( k=1; k<= M_; k++)
     140          {
     141            TFf(nbInterv-k) = conj(coefFourier_(k));
     142          }
     143        fftIntfPtr_-> FFTBackward(TFf, bidon);
     144        cout << " taille de bidon "<< bidon.Size() << endl;
     145        solution.ReSize(nbInterv);
     146        for (k=0; k< nbInterv; k++) solution(k) = bidon(k).real();
    139147      }
    140148  reshapeSignalInUsersFrame(solution);
Note: See TracChangeset for help on using the changeset viewer.