Changeset 3800 in Sophya for trunk/Cosmo/SimLSS/genefluct3d.cc
- Timestamp:
- Jul 19, 2010, 5:05:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/genefluct3d.cc
r3799 r3800 904 904 905 905 //------------------------------------------------------------------- 906 void GeneFluct3D::ToRedshiftSpace(void) 907 // Apply redshift distortion corrections 908 // ---- ATTENTION: Le spectre Pk doit etre (dRho/Rho)(k) 909 { 910 double zpk = compute_pk_redsh_ref_; 911 double beta = -(1.+zpk) * growth_->DsDz(zpk,good_dzinc_) / (*growth_)(zpk); 912 if(lp_>0) cout<<"--- ToRedshiftSpace --- at z="<<zpk<<", Beta="<<beta 913 <<" (km/s)/Mpc (comp. for dz="<<good_dzinc_<<")"<<endl; 914 check_array_alloc(); 915 916 for(long i=0;i<Nx_;i++) { 917 double kx = Kx(i); 918 for(long j=0;j<Ny_;j++) { 919 double ky = Ky(j); 920 double kt2 = kx*kx + ky*ky; 921 for(long l=0;l<NCz_;l++) { 922 double kz = Kz(l); 923 if(l==0) continue; 924 T_(l,j,i) *= (1. + beta*kz*kz/(kt2 + kz*kz)); 925 } 926 } 927 } 928 } 929 930 //------------------------------------------------------------------- 906 931 void GeneFluct3D::ToVelLoS(void) 907 // Le spectre Pk doit etre (dRho/Rho)(k) 932 /* 933 ---- Vitesse particuliere 934 Un atome au redshift "z" emet a la longueur d'onde "Le" si il est au repos 935 Il a une vitesse (particuliere) "V" dans le referentiel comobile au redshift "z" 936 Dans le referentiel comobile au redshift "z", il emet a la longueur d'onde "Le*(1+V/C)" 937 L'observateur voit donc une longueur d'onde "Le*(1+V/C)*(1+z) = Le*[1+z+V/C*(1+z)]" 938 et croit que l'atome est au redshift "z' = z + V/C*(1+z)" 939 L'observateur observe donc une vitesse particuliere (1+z)*V/c 940 --> vitesse particuliere dans le repere comobile en z: V/C 941 vitesse particuliere dans le repere comobile de l'observateur: (1+z)*V/C 942 ---- ATTENTION: Le spectre Pk doit etre (dRho/Rho)(k) 943 ---- On genere la vitesse particuliere (dans le referentiel comobile au redshift "z") 944 Vlos(k) = i*Beta(z)*k(los)/k^2*(dRho/Rho)(k) 945 .avec Beta(z) = dln(D)/da = -(1+z)/D*dD/dz 946 .on convertit en vitesse en faisant Vlos(k)/H(z) 947 */ 908 948 { 909 949 double zpk = compute_pk_redsh_ref_; … … 931 971 //------------------------------------------------------------------- 932 972 void GeneFluct3D::ApplyGrowthFactor(int type_evol) 933 // Apply Growth to real space 973 // Apply Growth to real space d(Rho)/Rho cube 934 974 // Using the correspondance between redshift and los comoving distance 935 975 // describe in vector "zred_" "loscom_" … … 971 1011 972 1012 //------------------------------------------------------------------- 973 void GeneFluct3D::ApplyDerGrowthFactor(int type_evol) 974 // Apply Conformal derivative of Growth to real space for transverse velocity cube 975 { 976 if(lp_>0) cout<<"--- ApplyDerGrowthFactor: evol="<<type_evol<<endl; 1013 void GeneFluct3D::ApplyRedshiftSpaceGrowthFactor(void) 1014 // Apply Growth(z) to redshift-distorted real space cube 1015 { 1016 const char *bla = "GeneFluct3D::ApplyRedshiftSpaceGrowthFactor_Error: redshift evolution impossible because factor depen on k"; 1017 cout<<bla<<endl; throw ParmError(bla); 1018 } 1019 1020 //------------------------------------------------------------------- 1021 void GeneFluct3D::ApplyVelLosGrowthFactor(int type_evol) 1022 // Apply Growth(z) to transverse velocity real space cube 1023 { 1024 if(lp_>0) cout<<"--- ApplyVelLosGrowthFactor: evol="<<type_evol<<endl; 977 1025 check_array_alloc(); 978 1026 979 1027 if(growth_ == NULL) { 980 const char *bla = "GeneFluct3D::Apply GrowthFactor_Error: set GrowthFactor first";1028 const char *bla = "GeneFluct3D::ApplyVelLosGrowthFactor_Error: set GrowthFactor first"; 981 1029 cout<<bla<<endl; throw ParmError(bla); 982 1030 } 983 1031 if(type_evol<1 || type_evol>2) { 984 const char *bla = "GeneFluct3D::Apply GrowthFactor_Error: bad type_evol value";1032 const char *bla = "GeneFluct3D::ApplyVelLosGrowthFactor_Error: bad type_evol value"; 985 1033 cout<<bla<<endl; throw ParmError(bla); 986 1034 }
Note:
See TracChangeset
for help on using the changeset viewer.