Skip to content

Commit

Permalink
Merge pull request #276 from LSSTDESC/generalise_cl_tracers
Browse files Browse the repository at this point in the history
Store input arrays when creating new ClTracer object
  • Loading branch information
elisachisari committed Jan 9, 2018
2 parents 94e2848 + 6d9aad7 commit 3633147
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 50 deletions.
18 changes: 12 additions & 6 deletions pyccl/cls.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ def __init__(self, cosmo, tracer_type=None, has_rsd=False,

# Convert array arguments that are 'None' into 'NoneArr' type, and
# check whether arrays were specified as tuples or with a common z array
z_n, n = _check_array_params(z, n, 'n')
z_b, b = _check_array_params(z, bias, 'bias')
z_s, s = _check_array_params(z, mag_bias, 'mag_bias')
z_ba, ba = _check_array_params(z, bias_ia, 'bias_ia')
z_rf, rf = _check_array_params(z, f_red, 'f_red')
self.z_n, self.n = _check_array_params(z, n, 'n')
self.z_b, self.b = _check_array_params(z, bias, 'bias')
self.z_s, self.s = _check_array_params(z, mag_bias, 'mag_bias')
self.z_ba, self.ba = _check_array_params(z, bias_ia, 'bias_ia')
self.z_rf, self.rf = _check_array_params(z, f_red, 'f_red')
self.z_source = z_source

# Construct new ccl_cl_tracer
status = 0
Expand All @@ -90,7 +91,12 @@ def __init__(self, cosmo, tracer_type=None, has_rsd=False,
int(has_rsd),
int(has_magnification),
int(has_intrinsic_alignment),
z_n, n, z_b, b, z_s, s, z_ba, ba, z_rf, rf, z_source,
self.z_n, self.n,
self.z_b, self.b,
self.z_s, self.s,
self.z_ba, self.ba,
self.z_rf, self.rf,
self.z_source,
status )

def __del__(self):
Expand Down

0 comments on commit 3633147

Please sign in to comment.