Some fixups

This commit is contained in:
Guilhem Lavaux 2019-11-11 10:32:40 +01:00
parent 1bd685e9c5
commit 71691956cc
6 changed files with 24 additions and 10 deletions

View file

@ -65,18 +65,30 @@ cdef class CosmologyPower:
cdef CosmoPower power
def __init__(self,**cosmo):
"""Constructor
Keyword arguments:
* omega_B_0
* omega_M_0
* h
* ns
* T27
"""
self.power = CosmoPower()
self.power.OMEGA_B = cosmo['omega_B_0']
self.power.OMEGA_C = cosmo['omega_M_0']-cosmo['omega_B_0']
self.power.h = cosmo['h']
if 'ns' in cosmo:
self.power.n = cosmo['ns']
if 'T27' in cosmo:
self.power.THETA_27 = cosmo['T27']
assert self.power.OMEGA_C > 0
self.power.updateCosmology()
def setNormalization(self,A):
"""Set manual normalization for A_S"""
self.power.setNormalization(A)
def normalize(self,s8,k_min=-1,k_max=-1):