-
-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TARDIS Grid #1738
TARDIS Grid #1738
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Before a pull request is accepted, it must meet the following criteria:
|
You may want to consider adding logging messages or passthrough handling for logging through run_tardis |
I still need to write some tests for this PR. |
Codecov Report
@@ Coverage Diff @@
## master #1738 +/- ##
==========================================
+ Coverage 61.87% 62.65% +0.78%
==========================================
Files 63 65 +2
Lines 5852 6036 +184
==========================================
+ Hits 3621 3782 +161
- Misses 2231 2254 +23
Continue to review full report at Codecov.
|
Added kwarg pass through so that users can specify run_tardis() kwargs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few small suggestions for clarity but functionally it looks good to me
---------- | ||
configFile : str | ||
path to TARDIS yml file. | ||
gridFrame : pandas.core.frame.DataFrame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly do some type-checking here? Could get weird if someone accidentally passes in a numpy array or a list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's necessary since there's effectively duck typing since the grid relies on .iloc[]
for accessing rows.
""" | ||
|
||
def __init__(self, configFile, gridFrame): | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps do type-checking here rather than exceptions?
* experimental notebook * init grid dataframe * config changes * added grid module * updated test * added docstrings * Added grid_row_to_model() class function. * Added docs for grid [build docs] * [build docs] * [build docs] * [build docs] * [build docs] * added grid doc to sidebar. [build docs] * Added tests * black formatting * renamed to base.py * cleared output so notebook is run when building docs * added kwarg pass through for run_tardis kwargs. * Fixed docstring Co-authored-by: Marc Williamson <[email protected]>
* experimental notebook * init grid dataframe * config changes * added grid module * updated test * added docstrings * Added grid_row_to_model() class function. * Added docs for grid [build docs] * [build docs] * [build docs] * [build docs] * [build docs] * added grid doc to sidebar. [build docs] * Added tests * black formatting * renamed to base.py * cleared output so notebook is run when building docs * added kwarg pass through for run_tardis kwargs. * Fixed docstring Co-authored-by: Marc Williamson <[email protected]>
* experimental notebook * init grid dataframe * config changes * added grid module * updated test * added docstrings * Added grid_row_to_model() class function. * Added docs for grid [build docs] * [build docs] * [build docs] * [build docs] * [build docs] * added grid doc to sidebar. [build docs] * Added tests * black formatting * renamed to base.py * cleared output so notebook is run when building docs * added kwarg pass through for run_tardis kwargs. * Fixed docstring Co-authored-by: Marc Williamson <[email protected]>
* experimental notebook * init grid dataframe * config changes * added grid module * updated test * added docstrings * Added grid_row_to_model() class function. * Added docs for grid [build docs] * [build docs] * [build docs] * [build docs] * [build docs] * added grid doc to sidebar. [build docs] * Added tests * black formatting * renamed to base.py * cleared output so notebook is run when building docs * added kwarg pass through for run_tardis kwargs. * Fixed docstring Co-authored-by: Marc Williamson <[email protected]>
Description
A new module for generating grids of TARDIS simulation parameters and functionality facilitating the running of large numbers of simulations.
Motivation and context
The grid streamlines running and saving large grids of simulation parameters. It will make it very easy to generate grids from basic uniform abundances and then modify the models in systematic ways to add complexity.
How has this been tested?
Examples
A thorough example is in the docs under /io/grid/
Type of change
Checklist