Skip to content

Commit

Permalink
raise error if get_sigma8_0 when not calcualted
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Nov 25, 2020
1 parent 103443b commit 7a85a78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions camb/results.py
Expand Up @@ -845,6 +845,9 @@ def get_sigma8_0(self):
:return: :math:`\sigma_8` today
"""
nz = self.Params.Transfer.PK_num_redshifts
if not nz or self.Params.Transfer.PK_redshifts[nz - 1] > 1e-5:
raise CAMBError("sigma8 requested at z=0, but P(z=0) not calcaulted")
return self.get_sigma8()[-1]

def get_fsigma8(self):
Expand Down

0 comments on commit 7a85a78

Please sign in to comment.