Skip to main content

A library for creating scripts to automate MESA and GYRE runs.

Project description

Megyr Build Status Documentation Status

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


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 details)

Uploaded Source

Built Distribution

megyr-0.2.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file megyr-0.2.1.tar.gz.

File metadata

  • Download URL: megyr-0.2.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2

File hashes

Hashes for megyr-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b5bee2fd3240d0dd994398e8d8111c72d31fd660810b6b9239afb8fe0dde9caa
MD5 bc8e20f9c17999cb4a648f0f0bfb018e
BLAKE2b-256 8ebb21fb3f108919d9357babd41effa5590216dffbeec18514cb1155043f32cc

See more details on using hashes here.

File details

Details for the file megyr-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: megyr-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2

File hashes

Hashes for megyr-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b5851c066b79434c2e80fcd018b13f3d0ad1d1cbecd791711105bbe9d7623e87
MD5 c9e4495d4677f098d9a81fffea607829
BLAKE2b-256 982d7d11642f3ea129a2a1681a0476feb8024f87d1d81d864ee8e084ddba72ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page