Ignore:
Timestamp:
Nov 21, 2007, 11:46:19 AM (18 years ago)
Author:
ansari
Message:

Ajout test sur Imag(Nyquist) pour calcul taille tableau reel de sortie pour FFT-multidim complexe->reel, Reza 21/11/2007

File:
1 edited

Legend:

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

    r3235 r3384  
    320320  }
    321321  else {  // We have to resize the output array
     322    T thr = ZeroThreshold();   // Seuil pour tester Imag(Nyquist) == 0
    322323    sa_size_t sz[BASEARRAY_MAXNDIMS];
    323324    if (ndg1 > 1) {
    324       sz[0] = 2*in.Size(0)-1;
     325      T imnyq = in(in.Size(0)-1,0,0).imag();
     326      // Rz+cmc/Nov07 :
     327      // Calcul de la taille SizeX/Sz[0]  paire/impaire en fonction de Imag(Nyquist)
     328      sz[0] = ((imnyq < -thr)||(imnyq > thr)) ? 2*in.Size(0)-1 : 2*in.Size(0)-2;
    325329      for(k=1; k<in.NbDimensions(); k++)
    326330        sz[k] = in.Size(k);
     
    329333    else {
    330334      for(k=0; k<BASEARRAY_MAXNDIMS; k++)  sz[k] = 1;
    331       T thr = ZeroThreshold();
    332335      sa_size_t n = in.Size(in.MaxSizeKA());
    333336      sa_size_t ncs = ( (in[n-1].imag() < -thr) || (in[n-1].imag() > thr) )
Note: See TracChangeset for help on using the changeset viewer.