Changeset 3787 in Sophya for trunk/Cosmo/RadioBeam/specpk.cc


Ignore:
Timestamp:
Jun 25, 2010, 12:00:30 PM (15 years ago)
Author:
ansari
Message:

Ajout classes / programmes de calcul d'effet de lobe sur les radio-sources, Reza 25/06/2010

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/RadioBeam/specpk.cc

    r3783 r3787  
    151151  // fourAmp represent 3-D fourier transform of a real input array.
    152152  // The second half of the array along Y and Z contain negative frequencies
    153   double kxx, kyy, kzz;
     153  double kxx, kyy, kzz, rep, amp;
    154154  // sa_size_t is large integer type 
    155155  for(sa_size_t kz=0; kz<fourAmp.SizeZ(); kz++) {
     
    158158      kyy =  (ky>fourAmp.SizeY()/2) ? -(double)(fourAmp.SizeY()-ky)*dky_ : (double)ky*dky_;
    159159      for(sa_size_t kx=0; kx<fourAmp.SizeX(); kx++) {
    160         double kxx=(double)kx*dkx_;
    161         double rep = resp(kxx, kyy);
     160        kxx=(double)kx*dkx_;
     161        rep = resp(kxx, kyy);
    162162        if (crmask&&(kz==0))  mask(ky,kx)=((rep<1.e-8)?9.e9:(1./rep));
    163163        if (rep<1.e-8)  fourAmp(kx, ky, kz) = complex<TF>(9.e9,0.);
    164164        else {
    165           double amp = 1./sqrt(rep)/sqrt(2.);
     165          amp = 1./sqrt(rep)/sqrt(2.);
    166166          fourAmp(kx, ky, kz) = complex<TF>(rg_.Gaussian(amp), rg_.Gaussian(amp));   
    167167        }
Note: See TracChangeset for help on using the changeset viewer.