Skip to content

Commit c24b818

Browse files
committed
overhaul of cosmology, inits, hmf self-consistency, remote.py, and re-naming of test problems to match submodules, in prep for retiring of mercurial repo on bitbucket
1 parent 9f37dd8 commit c24b818

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+865
-324
lines changed

.hgignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ input/cosmo_params/*
4949
input/inits/cr.log
5050
tests/htmlcov*
5151
tests/.coverage
52-
52+
input/planck/*

ares/analysis/DerivedQuantities.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def total_sfrd(data):
141141
}
142142

143143
class DerivedQuantities(object):
144-
def __init__(self, ModelSet=None, pf=None, data=None):
144+
def __init__(self, ModelSet=None, pf=None, data=None, cosm=None):
145145
self._ms = ModelSet
146146

147147
if pf is None:
@@ -153,10 +153,13 @@ def __init__(self, ModelSet=None, pf=None, data=None):
153153
else:
154154
self.pf = pf
155155

156-
try:
157-
self.cosm = self._ms.cosm
158-
except AttributeError:
159-
self.cosm = Cosmology(**self.pf)
156+
if cosm is not None:
157+
self.cosm = cosm
158+
else:
159+
try:
160+
self.cosm = self._ms.cosm
161+
except AttributeError:
162+
self.cosm = Cosmology(**self.pf)
160163

161164
self._data = {}
162165

ares/analysis/MultiPhaseMedium.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ class HistoryContainer(dict):
4040
"""
4141
A wrapper around DerivedQuantities.
4242
"""
43-
def __init__(self, pf={}):
43+
def __init__(self, pf={}, cosm=None):
4444
self._data = {}
45-
self._dq = DQ(ModelSet=None, pf=pf)
45+
self._dq = DQ(ModelSet=None, cosm=cosm, pf=pf)
4646

4747
def add_data(self, data):
4848
self._dq._add_data(data)

0 commit comments

Comments
 (0)