Skip to content

Commit

Permalink
a sign can change everything
Browse files Browse the repository at this point in the history
  • Loading branch information
foglienimatteo committed Mar 7, 2022
1 parent 2fafc3f commit 35da76a
Show file tree
Hide file tree
Showing 22 changed files with 1,465 additions and 1,451 deletions.
6 changes: 3 additions & 3 deletions src/BackgroundData.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ It is internally used in `Cosmology.`
- `names = NAMES_BACKGROUND` : the column names of the `file`. If the colum order change from
the default one `NAMES_BACKGROUND`, you must set as input the vector of string with the correct
one, with the SAME names. They are, with the default order:
$(println(NAMES_BACKGROUND))
one, with the SAME names. They are, with the default order:\n
$(NAMES_BACKGROUND)
- `h = 0.7` : the adimensional hubble constant. By default, CLASS background data are measured with
it nuymerically expressed (so distances are measured in `Mpc`, for example), while this code works
Expand Down Expand Up @@ -251,8 +251,8 @@ struct CosmoParams


function CosmoParams(z_min, z_max, θ_max;
k_min = 1e-8, k_max = 10.0,
Ω_b = 0.0489, Ω_cdm = 0.251020, h_0 = 0.70,
k_min = 1e-8, k_max = 10.0,
N::Integer = 1024, fit_min = 0.05, fit_max = 0.5, con::Bool = true,
s_lim = 1e-2)

Expand Down
4 changes: 2 additions & 2 deletions src/Cosmology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ Correlation Function computations.
- `names = NAMES_BACKGROUND` : the column names of the `file_data`. If the colum order change from
the default one `NAMES_BACKGROUND`, you must set as input the vector of string with the correct
one, with the SAME names. They are, with the default order:
$(println(NAMES_BACKGROUND))
one, with the SAME names. They are, with the default order:\n
$(NAMES_BACKGROUND)
See also: [`InputPS`](@ref), [`CosmoParams`](@ref), [`IPSTools`](@ref),
[`BackgroundData`](@ref), [`WindowF`](@ref), [`F_map`](@ref), [`func_z_eff`](@ref),
Expand Down
4 changes: 2 additions & 2 deletions src/CrossCorrelations/DopplerIntegratedGP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ and:
J_{31} =
\frac{D(\chi_2) (s_1 - \chi_2 \cos{\theta})}{a(\chi_2)} \chi^2
\left(
- \frac{1}{s_2} + \mathcal{R}(s_2) \mathcal{H}(\chi_2) (f(\chi_2) - 1)
\frac{1}{s_2} - \mathcal{R}(s_2) \mathcal{H}(\chi_2) (f(\chi_2) - 1)
\right)
```
Expand Down Expand Up @@ -84,7 +84,7 @@ function integrand_ξ_Doppler_IntegratedGP(
#first = common * factor * (1 / 15 * I00 + 2 / 21 * I20 + 1 / 35 * I40 + I02)

#new_J31 = -3 * χ2^3 * y * f0 * ℋ0 * (ℛ_s1 + 1) * (s2 * (f2 - 1) * ℋ2 * ℛ_s2 + 1)
new_J31 = Δχ2^2 * D2 * (s1 - χ2 * y) / a2 * (ℛ_s2 * ℋ2 * (f2 - 1) - 1 / s2)
new_J31 = Δχ2^2 * D2 * (s1 - χ2 * y) / a2 * ( 1 / s2 - ℛ_s2 * ℋ2 * (f2 - 1))
I13 = cosmo.tools.I13(Δχ2)

second = common * new_J31 * I13
Expand Down
4 changes: 2 additions & 2 deletions src/CrossCorrelations/DopplerLocalGP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Return the Doppler-LocalGP cross-correlation function, defined as follows:
\xi^{v_{\parallel}\phi} (s_1, s_2, \cos{\theta}) =
\frac{3}{2 a(s_2)} \mathcal{H}(s_1) f(s_1) D(s_1)
\mathcal{R}(s_1) \mathcal{H}_0^2 \Omega_{M0} D(s_2)
(1 + \mathcal{R}(s_2)) (s_1 - s_2\cos{\theta}) s^2 I^3_1(s)
(1 + \mathcal{R}(s_2)) (s_2\cos{\theta} - s_1) s^2 I^3_1(s)
```
where ``\mathcal{H} = a H``,
``y = \cos{\theta} = \hat{\mathbf{s}}_1 \cdot \hat{\mathbf{s}}_2`` and :
Expand Down Expand Up @@ -56,7 +56,7 @@ function ξ_Doppler_LocalGP(P1::Point, P2::Point, y, cosmo::Cosmology)
Δs = s(s1, s2, y)

prefac = 1.5 / a2 * ℋ1 * f1 * D1 * ℛ1 * ℋ0^2 * Ω_M0 * D2 * (1 + ℛ2)
factor = (s1 - s2 * y) * Δs^2
factor = (s2 * y - s1) * Δs^2

I13 = cosmo.tools.I13(Δs)

Expand Down
17 changes: 9 additions & 8 deletions test/datatest/map_sum_xi_L0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@
# σ_2 = 100.85852368830226
# σ_3 = 3735.1226181519773
#
# computational time needed (in s) : 12.0555
# computational time needed (in s) : 17.5008
# kwards passed:
# N_log = 3
# μ_atol = 0.0
# use_windows = false
# N_log = 3
# enhancer = 1.0e8
# N_μs = 30
# μ_atol = 0.0
# μ_rtol = 0.01
# pr = true
#
# s [Mpc/h_0] xi_SUM xi_auto_doppler xi_auto_lensing xi_auto_localgp xi_auto_integratedgp xi_lensing_doppler xi_doppler_lensing xi_doppler_localgp xi_localgp_doppler xi_doppler_integratedgp xi_integratedgp_doppler xi_lensing_localgp xi_localgp_lensing xi_lensing_integratedgp xi_integratedgp_lensing xi_localgp_integratedgp xi_integratedgp_localgp
10.0 3.100057865775196e-5 3.1083647323130395e-5 1.617540202369208e-7 -1.21383701230076e-10 -3.49295089623204e-10 -1.6900809977615647e-7 -1.6924376436917377e-7 8.264905880080302e-10 6.044013181911759e-10 3.906461398291596e-8 3.906284620812885e-8 7.272492754980249e-9 7.27786631713832e-9 2.1861059508231394e-9 2.187002470696239e-9 -2.2909254896728633e-9 -2.2910367803886207e-9
100.0 6.006178411066864e-6 6.024865181025425e-6 1.9780419647453728e-8 -4.9633712604631205e-9 -3.870682784239748e-10 -7.051019541134061e-8 -7.711583800345777e-8 2.292720951467199e-8 1.698413720953249e-8 3.2354497106195044e-8 3.224582344522693e-8 5.74351175585059e-9 6.104777136983635e-9 1.537461723506664e-9 1.595320758808456e-9 -2.4870626291800128e-9 -2.496392673925445e-9
300.0 9.834804209819796e-7 8.992670696422657e-7 4.390158923408416e-9 -1.526949939249473e-8 -5.650486208049296e-10 -7.554056283454021e-9 -2.230891563010909e-8 4.447934241479703e-8 3.7317043925737376e-8 2.1126957902449834e-8 2.1113063300348826e-8 2.3652633246115675e-9 4.094282218195058e-9 6.949249973729436e-10 9.061931506712828e-10 -3.2701624458780454e-9 -3.3061964451371894e-9
700.0 1.9540157917742675e-7 1.4055178762472735e-7 1.65683447635497e-9 -1.387147283648418e-8 -9.952329450745797e-10 5.971511328265444e-10 -5.111667985927547e-9 1.3513756515145347e-8 4.035832620379043e-8 1.3147582840969097e-8 1.0360300419959947e-8 -5.233533247831251e-11 2.498063130210084e-9 2.358619426410098e-10 4.856778020909242e-10 -5.07087713847432e-9 -2.902176672849967e-9
1000.0 6.161330318538807e-8 3.70429288148483e-8 1.148203496583022e-9 -8.701923426808867e-9 -1.3189966155445926e-9 2.437012122147995e-10 -2.1595251409863386e-9 5.172174705786513e-9 2.048989062874215e-8 1.0752716768250802e-8 4.8564103242756225e-9 -5.031090591479135e-11 1.9502602679213973e-9 1.4896878162932332e-10 3.647613731455436e-10 -6.476931202798078e-9 -1.8490258959567266e-9
10.0 3.0841461953557463e-5 3.1083647323130395e-5 1.617540202369208e-7 -1.21383701230076e-10 -3.49295089623204e-10 -1.6900809977615647e-7 -1.6924376436917377e-7 -8.264905880080302e-10 -6.044013181911759e-10 -3.906461398291596e-8 -3.906284620812885e-8 7.272492754980249e-9 7.27786631713832e-9 2.1861059508231394e-9 2.187002470696239e-9 -2.2909254896728633e-9 -2.2910367803886207e-9
100.0 5.79715507651561e-6 6.024865181025425e-6 1.9780419647453728e-8 -4.9633712604631205e-9 -3.870682784239748e-10 -7.051019541134061e-8 -7.711583800345777e-8 -2.292720951467199e-8 -1.698413720953249e-8 -3.2354497106195044e-8 -3.224582344522693e-8 5.74351175585059e-9 6.104777136983635e-9 1.537461723506664e-9 1.595320758808456e-9 -2.4870626291800128e-9 -2.496392673925445e-9
300.0 7.35407605895314e-7 8.992670696422657e-7 4.390158923408416e-9 -1.526949939249473e-8 -5.650486208049296e-10 -7.554056283454021e-9 -2.230891563010909e-8 -4.447934241479703e-8 -3.7317043925737376e-8 -2.1126957902449834e-8 -2.1113063300348826e-8 2.3652633246115675e-9 4.094282218195058e-9 6.949249973729436e-10 9.061931506712828e-10 -3.2701624458780454e-9 -3.3061964451371894e-9
700.0 4.064164721769716e-8 1.4055178762472735e-7 1.65683447635497e-9 -1.387147283648418e-8 -9.952329450745797e-10 5.971511328265444e-10 -5.111667985927547e-9 -1.3513756515145347e-8 -4.035832620379043e-8 -1.3147582840969097e-8 -1.0360300419959947e-8 -5.233533247831251e-11 2.498063130210084e-9 2.358619426410098e-10 4.856778020909242e-10 -5.07087713847432e-9 -2.902176672849967e-9
1000.0 -2.0929081668722087e-8 3.70429288148483e-8 1.148203496583022e-9 -8.701923426808867e-9 -1.3189966155445926e-9 2.437012122147995e-10 -2.1595251409863386e-9 -5.172174705786513e-9 -2.048989062874215e-8 -1.0752716768250802e-8 -4.8564103242756225e-9 -5.031090591479135e-11 1.9502602679213973e-9 1.4896878162932332e-10 3.647613731455436e-10 -6.476931202798078e-9 -1.8490258959567266e-9
185 changes: 93 additions & 92 deletions test/datatest/monopoles/xi_auto_doppler_L0.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This is an integration map on mu of the ξ multipole auto_doppler GR effect.
# The following parameters were used for this computation:
# CLASS Power Spectrum input file : "../test/datatest/file_pk.txt"
# F window function input file : "../test/datatest/F_REFERENCE.txt"
# CLASS Background input file: "../test/datatest/WideA_ZA_background.dat"
# CLASS Power Spectrum input file : "/Users/matteofoglieni/AAA_TESI_MAGISTRALE/GaPSE/test/datatest/file_pk.txt"
# F window function input file : "/Users/matteofoglieni/AAA_TESI_MAGISTRALE/GaPSE/test/datatest/F_REFERENCE.txt"
# CLASS Background input file: "/Users/matteofoglieni/AAA_TESI_MAGISTRALE/GaPSE/test/datatest/WideA_ZA_background.dat"
# z_min = 0.05 z_max = 0.2
# k_min = 1.0e-8 k_max = 10.0
# h_0 = 0.7 Ω_b = 0.0489 Ω_cdm = 0.25102 Ω_M0 = 0.29992
Expand All @@ -13,117 +13,118 @@
# Volume of the survey V_survey = 3.845366167995967e8
# σ_0 = 15.593462966741178
# σ_1 = 15.074895881392285
# σ_2 = 100.85852368830221
# σ_3 = 3735.1227501923527
# σ_2 = 100.85852368830226
# σ_3 = 3735.1226181519773
#
# computational time needed (in s) : 1.3243
# computational time needed (in s) : 1.0966
# kwards passed:
# use_windows = false
# L = 0
# μ_atol = 0.0
# enhancer = 1.0e8
# pr = false
# N_μs = 30
# N_log = 100
# μ_rtol = 0.01
#
# s [Mpc/h_0] xi
0.1 4.058409835906719e-5
0.10974987654930562 4.058432011750143e-5
0.12045035402587821 4.058096368701013e-5
0.1321941148466029 4.0576179512525354e-5
0.14508287784959398 4.0571654878221104e-5
0.1592282793341092 4.0566135977506345e-5
0.17475284000076838 4.055959028761368e-5
0.19179102616724888 4.055262606660798e-5
0.21049041445120203 4.0544274862999545e-5
0.23101297000831597 4.05347704474434e-5
0.2535364493970112 4.052381358452298e-5
0.2782559402207124 4.0511232212575515e-5
0.30538555088334157 4.0496761967753236e-5
0.3351602650938842 4.0480171095981206e-5
0.3678379771828633 4.046112944885679e-5
0.40370172585965547 4.043931506119803e-5
0.44306214575838804 4.0414338325057826e-5
0.4862601580065353 4.0385767741827456e-5
0.533669923120631 4.035312008712583e-5
0.5857020818056666 4.031585274290655e-5
0.6428073117284321 4.027336265557301e-5
0.7054802310718643 4.022497799485637e-5
0.7742636826811271 4.016995379051388e-5
0.8497534359086443 4.0107467164810024e-5
0.9326033468832199 4.0036613142035165e-5
1.0235310218990261 3.995683114999256e-5
1.1233240329780274 3.986624587027299e-5
1.2328467394420661 3.976407047424645e-5
1.353047774579807 3.9649052702342096e-5
1.484968262254465 3.951985480320762e-5
1.6297508346206442 3.937505876058866e-5
1.788649529057435 3.921317488915172e-5
1.9630406500402708 3.903265031974045e-5
2.154434690031884 3.883187960916858e-5
2.3644894126454075 3.86092170023459e-5
2.595024211399736 3.836298835364236e-5
2.8480358684358014 3.809150145933677e-5
3.1257158496882362 3.779305311542442e-5
3.4304692863149184 3.746592764879231e-5
3.7649358067924683 3.710838980999071e-5
4.132012400115337 3.671867286326996e-5
4.534878508128582 3.629496684384994e-5
4.977023564332112 3.583541789635183e-5
5.462277217684341 3.533815212854306e-5
5.99484250318941 3.480133622806923e-5
6.579332246575681 3.4223283654735084e-5
0.1 4.058409835906878e-5
0.10974987654930562 4.058432011750345e-5
0.12045035402587821 4.058096368701248e-5
0.1321941148466029 4.057617951252609e-5
0.14508287784959398 4.0571654878219756e-5
0.1592282793341092 4.0566135977502964e-5
0.17475284000076838 4.0559590287609105e-5
0.19179102616724888 4.055262606660663e-5
0.21049041445120203 4.054427486299933e-5
0.23101297000831597 4.053477044744459e-5
0.2535364493970112 4.052381358452459e-5
0.2782559402207124 4.0511232212576295e-5
0.30538555088334157 4.049676196775537e-5
0.3351602650938842 4.048017109598235e-5
0.3678379771828633 4.0461129448856776e-5
0.40370172585965547 4.043931506119773e-5
0.44306214575838804 4.0414338325057216e-5
0.4862601580065353 4.038576774182747e-5
0.533669923120631 4.035312008712608e-5
0.5857020818056666 4.031585274290718e-5
0.6428073117284321 4.027336265557345e-5
0.7054802310718643 4.022497799485616e-5
0.7742636826811271 4.016995379051373e-5
0.8497534359086443 4.010746716481033e-5
0.9326033468832199 4.00366131420357e-5
1.0235310218990261 3.99568311499923e-5
1.1233240329780274 3.986624587027273e-5
1.2328467394420661 3.976407047424688e-5
1.353047774579807 3.964905270234193e-5
1.484968262254465 3.951985480320794e-5
1.6297508346206442 3.937505876058867e-5
1.788649529057435 3.921317488915203e-5
1.9630406500402708 3.903265031974044e-5
2.154434690031884 3.883187960916871e-5
2.3644894126454075 3.8609217002345796e-5
2.595024211399736 3.836298835364234e-5
2.8480358684358014 3.8091501459336706e-5
3.1257158496882362 3.7793053115424516e-5
3.4304692863149184 3.746592764879241e-5
3.7649358067924683 3.710838980999075e-5
4.132012400115337 3.6718672863269994e-5
4.534878508128582 3.629496684384989e-5
4.977023564332112 3.5835417896351866e-5
5.462277217684341 3.5338152128542984e-5
5.99484250318941 3.480133622806929e-5
6.579332246575681 3.422328365473513e-5
7.220809018385464 3.3602589899337156e-5
7.924828983539173 3.293825156413249e-5
7.924828983539173 3.29382515641325e-5
8.697490026177835 3.222970717564044e-5
9.54548456661834 3.147676263484633e-5
10.476157527896646 3.06794585272962e-5
11.497569953977356 2.9838045798542477e-5
12.618568830660204 2.895319486528703e-5
13.848863713938732 2.8026284833762512e-5
15.199110829529339 2.705938859117852e-5
16.68100537200059 2.605494760039667e-5
18.30738280295368 2.5015785072894288e-5
20.09233002565047 2.3945505219996517e-5
22.051307399030456 2.2848293429488446e-5
9.54548456661834 3.147676263484632e-5
10.476157527896646 3.067945852729621e-5
11.497569953977356 2.983804579854249e-5
12.618568830660204 2.8953194865287022e-5
13.848863713938732 2.80262848337625e-5
15.199110829529339 2.7059388591178522e-5
16.68100537200059 2.6054947600396667e-5
18.30738280295368 2.501578507289428e-5
20.09233002565047 2.394550521999653e-5
22.051307399030456 2.284829342948845e-5
24.20128264794382 2.1728641496807788e-5
26.560877829466868 2.059172266065244e-5
29.150530628251772 1.9443032130502452e-5
31.992671377973828 1.8288473412973277e-5
35.11191734215131 1.7134205589091445e-5
26.560877829466868 2.0591722660652432e-5
29.150530628251772 1.9443032130502462e-5
31.992671377973828 1.8288473412973284e-5
35.11191734215131 1.713420558909145e-5
38.53528593710529 1.598660870747348e-5
42.29242874389499 1.4852115817845014e-5
46.4158883361278 1.3737180682160373e-5
42.29242874389499 1.4852115817845018e-5
46.4158883361278 1.3737180682160374e-5
50.94138014816378 1.2648129589611943e-5
55.90810182512222 1.1591054195833617e-5
61.35907273413173 1.0571720595145105e-5
67.34150657750821 9.595502088191353e-6
61.35907273413173 1.0571720595145102e-5
67.34150657750821 9.595502088191351e-6
73.90722033525779 8.667418060822114e-6
81.11308307896873 7.792391734570977e-6
89.02150854450383 6.9749572540626265e-6
81.11308307896873 7.792391734570979e-6
89.02150854450383 6.974957254062627e-6
97.70099572992251 6.210752829598366e-6
107.22672220103232 5.471559489961209e-6
117.68119524349979 4.750410171568406e-6
107.22672220103232 5.47155948996121e-6
117.68119524349979 4.750410171568404e-6
129.1549665014884 4.078954335523599e-6
141.74741629268047 3.479204602682838e-6
141.74741629268047 3.4792046026828395e-6
155.56761439304722 2.955348410944907e-6
170.73526474706904 2.5032300857269497e-6
170.73526474706904 2.50323008572695e-6
187.3817422860385 2.1159669446645762e-6
205.65123083486515 1.7859714369503168e-6
225.7019719633919 1.5062106930821347e-6
205.65123083486515 1.7859714369503164e-6
225.7019719633919 1.506210693082134e-6
247.70763559917114 1.270563541871931e-6
271.85882427329403 1.0729360699334007e-6
271.85882427329403 1.0729360699334002e-6
298.364724028334 9.08033090928611e-7
327.45491628777285 7.716896656498474e-7
327.45491628777285 7.716896656498471e-7
359.38136638046257 6.609658199229764e-7
394.4206059437656 5.754321679096601e-7
432.8761281083057 5.358910107443911e-7
475.0810162102798 4.731438166745373e-7
521.4008287999684 3.7050366155381146e-7
572.236765935022 2.788066652200629e-7
628.0291441834253 2.0504910948391071e-7
689.2612104349695 1.4847651135484737e-7
756.463327554629 1.0626844894217568e-7
830.2175681319744 7.535523256855079e-8
911.1627561154896 5.301722783524861e-8
1000.0 3.7042928814848375e-8
394.4206059437656 5.7543216790966e-7
432.8761281083057 5.358910107443908e-7
475.0810162102798 4.731438166745374e-7
521.4008287999684 3.705036615538118e-7
572.236765935022 2.7880666522006267e-7
628.0291441834253 2.0504910948391106e-7
689.2612104349695 1.4847651135484723e-7
756.463327554629 1.0626844894217559e-7
830.2175681319744 7.535523256855076e-8
911.1627561154896 5.301722783524859e-8
1000.0 3.70429288148483e-8
Loading

0 comments on commit 35da76a

Please sign in to comment.