Skip to content

Commit

Permalink
fixing doc/codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
karllark committed Aug 27, 2024
1 parent 14a6276 commit 814dd05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
4 changes: 1 addition & 3 deletions docs/megabeast/core_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
Core
****

.. automodapi:: megabeast.singlepop_dust_model

.. automodapi:: megabeast.mbsettings
.. automodapi:: megabeast.mbmodel

.. automodapi:: megabeast.helpers
19 changes: 11 additions & 8 deletions megabeast/tests/test_mbmodel_init.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import astropy.units as u
from megabeast.mbmodel import MBModel


def test_mbmodel_init():

# stellar population model
Expand All @@ -20,21 +21,21 @@ def test_mbmodel_init():
"varnames": ["slope"],
"varinit": [2.35],
"prior": {
"name": "flat",
"minmax": [[2.0, 3.0]],
}
"name": "flat",
"minmax": [[2.0, 3.0]],
},
},
"Z": {
"name": "flat",
},
},
"distance": {
"name": "absexponential",
"varnames": ["dist0", "tau", "amp"],
"varinit": [60.0 * u.kpc, 5. * u.kpc, 1.0],
"varinit": [60.0 * u.kpc, 5.0 * u.kpc, 1.0],
"prior": {
"name": "flat",
"minmax": [[50.0, 3.0, 0.9], [70.0, 7.0, 1.1]],
}
},
},
}

Expand Down Expand Up @@ -67,7 +68,7 @@ def test_mbmodel_init():
"name": "flat",
"minmax": [[0.0, 1.0], [0.05, 0.5]],
},
}
},
}

mod = MBModel(stellar_model, dust_model)
Expand All @@ -85,4 +86,6 @@ def test_mbmodel_init():
for cparam in mod.physics_model.keys():
assert cparam in expparam
for csubparam in ["name", "model"]:
assert csubparam in mod.physics_model[cparam].keys(), f"required {csubparam} not found in {cparam}"
assert (
csubparam in mod.physics_model[cparam].keys()
), f"required {csubparam} not found in {cparam}"

0 comments on commit 814dd05

Please sign in to comment.