Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
halo_project
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yuba Amoura
halo_project
Commits
09bc5bcb
Commit
09bc5bcb
authored
4 years ago
by
yuba
Browse files
Options
Downloads
Patches
Plain Diff
projec finished
parent
45ec9486
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
formation_time.py
+404
-70
404 additions, 70 deletions
formation_time.py
halo_mass_function.py
+21
-17
21 additions, 17 deletions
halo_mass_function.py
with
425 additions
and
87 deletions
formation_time.py
+
404
−
70
View file @
09bc5bcb
This diff is collapsed.
Click to expand it.
halo_mass_function.py
+
21
−
17
View file @
09bc5bcb
...
...
@@ -393,21 +393,25 @@ plt.ylabel(r'$\nu$', size=15)
plt.legend()
plt.show()
'''
######################################-----------------Omega m---------------------------###############################
'''
import matplotlib.pyplot as plt
M = np.logspace(9, 17, 1000)
omegam = [0.15, 0.3, 0.5]
for el in omegam:
nu1 = nu(M, z=0, om0=el, ol0=1-el)
my_cosmo = {
'
flat
'
: True,
'
H0
'
: 100 * h,
'
Om0
'
: el,
'
Ode0
'
: 1-el,
'
Ob0
'
: omb,
'
sigma8
'
: sigma8,
'
ns
'
: ns}
cosmo = cosmology.setCosmology(
'
my_cosmo
'
, my_cosmo)
nu2 = peaks.peakHeight(M, z=0)
plt.loglog(M, nu1, label=
'
Analytic $\Omega_m$=
'
+str(el))
plt.loglog(M, nu2,
'
--
'
, label=
'
COLOSSUS
'
)
plt.xlabel(
'
M [$M_\odot/h$]
'
, size=15)
plt.ylabel(r
'
$
\n
u$
'
, size=15)
plt.legend()
plt.show()
'''
# ######################################-----------------Omega m---------------------------###############################
# import matplotlib.pyplot as plt
# #M = np.logspace(14, 16, 1000)
# M = 1e15
# zs= np.linspace(0, 2, 1000)
# omegam = [0.15, 0.3, 0.5]
# for el in omegam:
# nu1 = nu(M, z=zs, om0=el, ol0=1-el)
# my_cosmo = {'flat': True, 'H0': 100 * h, 'Om0': el, 'Ode0': 1-el, 'Ob0': omb, 'sigma8': sigma8, 'ns': ns}
# cosmo = cosmology.setCosmology('my_cosmo', my_cosmo)
# nu2 = []
# for z in zs:
# nu2.append(peaks.peakHeight(M, z=z))
# plt.loglog(zs, nu1, label='Analytic $\Omega_m$='+str(el))
# plt.loglog(zs, nu2,'--', label='COLOSSUS')
# plt.xlabel('z', size=15)
# plt.ylabel(r'$\nu$', size=15)
# plt.legend()
# plt.show()
'''
import matplotlib.pyplot as plt
...
...
@@ -788,7 +792,7 @@ for k in range(len(onepluszs)):
plt.savefig(
'
om_s8_n_M
'
+str(round(np.log10(mt), 2))+
'
z
'
+str(round(el-1, 2))+
'
.png
'
,
bbox_inches =
'
tight
'
)
plt.show()
'''
import
matplotlib.pyplot
as
plt
'''
import matplotlib.pyplot as plt
import matplotlib as mpl
from matplotlib import ticker
params = {
'
legend.fontsize
'
: 10,
'
legend.handlelength
'
: 1}
...
...
@@ -843,7 +847,7 @@ for ax in axs.flat:
#cbar.ax.tick_params(labelsize=15)
plt.savefig(
'
om_s8_n_M
'
+str(round(np.log10(mt), 2))+
'
z
'
+str(round(el-1, 2))+
'
.png
'
,bbox_inches =
'
tight
'
, dpi=1100)
plt
.
show
()
plt.show()
'''
########################################-----------------sigma8 =const----------------##################################
'''
import matplotlib.pyplot as plt
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment