Skip to content

Commit

Permalink
added unit tests for starmodel fits
Browse files Browse the repository at this point in the history
  • Loading branch information
timothydmorton committed May 15, 2015
1 parent 9fedbec commit f072f71
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions isochrones/starmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,11 @@ def _make_samples(self):

if not self.use_emcee:
chain = np.loadtxt('{}post_equal_weights.dat'.format(self._mnest_basename))

#for purposes of unit test, sometimes there will be 1-length chain...
if chain.ndim==1:
chain = np.array([chain])

mass = chain[:,0]
age = chain[:,1]
feh = chain[:,2]
Expand Down Expand Up @@ -1353,6 +1358,11 @@ def _make_samples(self):

if not self.use_emcee:
chain = np.loadtxt('{}post_equal_weights.dat'.format(self._mnest_basename))

#for purposes of unit test, sometimes there will be 1-length chain...
if chain.ndim==1:
chain = np.array([chain])

mass_A = chain[:,0]
mass_B = chain[:,1]
age = chain[:,2]
Expand Down Expand Up @@ -1698,6 +1708,11 @@ def _make_samples(self):

if not self.use_emcee:
chain = np.loadtxt('{}post_equal_weights.dat'.format(self._mnest_basename))

#for purposes of unit test, sometimes there will be 1-length chain...
if chain.ndim==1:
chain = np.array([chain])

mass_A = chain[:,0]
mass_B = chain[:,1]
mass_C = chain[:,2]
Expand Down

0 comments on commit f072f71

Please sign in to comment.