A library for creating scripts to automate MESA and GYRE runs.
Project description
Megyr
![Documentation Status](https://pypi-camo.freetls.fastly.net/1ae1cb0d8f4b867216a64ffa30b2989d4e99887a/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f6d656779722f62616467652f3f76657273696f6e3d6c6174657374)
Megyr is a Python library for creating scripts to automate MESA and GYRE runs over grids of parameter values. It provides a main function that you can run with a set of configuration settings to determine how to run MESA and GYRE and what values to use for the different models.
import megyr
def main():
megyr.run({
"input": {
"mesa_configs": ["inlist.mustache"],
"gyre_config": "gyre.in.mustache"
},
"output": {
"gyre_oscillations_ad_summary_file": "oscillations_ad.csv"
},
"settings": {
"mesa_star_location": "star",
"gyre_location": "$GYRE_DIR/bin/gyre",
},
"stages": {
"mesa_params": mesa_params,
"gyre_params": calc_gyre_params,
}
})
mesa_params = {
"initial_mass": [1, 1.1, 1.5],
"y": [0.25, 0.27, 0.32]
}
def calc_gyre_params(mesa_params, mesa_data):
return {
"l": [0, 1, 2],
# Look at all the profiles that are at least 1 Gyr in age
"profile": mesa_data[mesa_data["star_age"] > 1000000000]["profile"]
}
if __name__ == "__main__":
main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
megyr-0.2.1.tar.gz
(8.0 kB
view hashes)
Built Distribution
megyr-0.2.1-py3-none-any.whl
(10.1 kB
view hashes)