Skip to content

Commit

Permalink
remove failure mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimerzp committed Aug 26, 2024
1 parent 4df11fb commit e90be1a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions sacc/tracers.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,14 +687,12 @@ def __init__(self, name, ens, z=None, **kwargs):
"""
super().__init__(name, **kwargs)
self.ensemble = ens
if z is None:
ens_meta = ens.metadata()
if 'bins' in list(ens_meta.keys()):
z = ens_meta['bins'][0]
else:
raise ValueError("No redshift bins provided or found in ensemble metadata")
ens_meta = ens.metadata()
if (z is None) and ('bins' in ens_meta.keys()):
self.z = ens_meta['bins'][0]
else:
self.z = z
self.nz = np.mean(ens.pdf(z),axis=0)
self.z = z

@classmethod
def to_tables(cls, instance_list):
Expand Down

0 comments on commit e90be1a

Please sign in to comment.