Changeset 3773 in Sophya for trunk/Cosmo/SimLSS/genefluct3d.cc
- Timestamp:
- May 9, 2010, 12:47:58 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/genefluct3d.cc
r3770 r3773 118 118 Nz_ = nz; if(Nz_ <= 0) Nz_ = Nx_; 119 119 N_.resize(0); N_.push_back(Nx_); N_.push_back(Ny_); N_.push_back(Nz_); 120 NRtot_ = Nx_*Ny_*Nz_; // nombre de pixels dans le survey120 NRtot_ = (int_8)Nx_*(int_8)Ny_*(int_8)Nz_; // nombre de pixels dans le survey 121 121 NCz_ = Nz_/2 +1; 122 122 NTz_ = 2*NCz_; … … 766 766 // Take into account the real and complexe conjugate coefficients 767 767 // because we want a realization of a real data in real space 768 // On ecrit que: P(k_x,k_y,k_z) = P(-k_x,-k_y,-k_z)768 // On ecrit que: conj(P(k_x,k_y,k_z)) = P(-k_x,-k_y,-k_z) 769 769 // avec k_x = i, -k_x = N_x - i etc... 770 770 { … … 773 773 774 774 // 1./ Le Continu et Nyquist sont reels 775 longnreal = 0;775 int_8 nreal = 0; 776 776 for(long kk=0;kk<2;kk++) { 777 777 long k=0; // continu … … 795 795 796 796 // a./ les lignes et colonnes du continu et de nyquist 797 longnconj1 = 0;797 int_8 nconj1 = 0; 798 798 for(long kk=0;kk<2;kk++) { 799 799 long k=0; // continu … … 823 823 824 824 // b./ les lignes et colonnes hors continu et de nyquist 825 longnconj2 = 0;825 int_8 nconj2 = 0; 826 826 for(long kk=0;kk<2;kk++) { 827 827 long k=0; // continu … … 840 840 if(lp_>1) cout<<"Number of forced conjugate hors cont+nyq ="<<nconj2<<endl; 841 841 842 if(lp_>1) cout<<"Check: ddl= "<<NRtot_<<" =?= "<<2*(N x_*Ny_*NCz_-nconj1-nconj2)-nreal<<endl;842 if(lp_>1) cout<<"Check: ddl= "<<NRtot_<<" =?= "<<2*(NRtot_-nconj1-nconj2)-nreal<<endl; 843 843 844 844 return nreal+nconj1+nconj2; … … 897 897 //------------------------------------------------------------------- 898 898 void GeneFluct3D::ToVelLoS(void) 899 // Le spectre Pk doit etre (dRho/Rho)(k) 899 900 { 900 901 double zpk = compute_pk_redsh_ref_; … … 912 913 double kz = Kz(l); 913 914 double k2 = kt2 + kz*kz; 914 if(k2<=0.) continue; 915 T_(l,j,i) *= complex<double>(0.,dpsd*kz/k2); 916 } 917 } 918 } 915 if(l==0) k2 = 0.; else k2 = dpsd*kz/k2; 916 T_(l,j,i) *= complex<double>(0.,k2); 917 } 918 } 919 } 920 919 921 } 920 922
Note:
See TracChangeset
for help on using the changeset viewer.