Tools for Modelling Stars and their Oscillations

TOMSO is a set of Python modules for loading and saving input and output files for and from stellar evolution and oscillation codes. The functions are bundled together in modules that correspond to a specific stellar evolution, oscillation code or file format.

The code is intended to be the minimum necessary to usefully manipulate input and output data. The only current requirement is NumPy. It is also very unstable. Expect the API to change drastically or completely without warning!


You can install most recent stable(ish) version of TOMSO from the Python Package Index using

pip install tomso

The development version is on GitHub. The repo also includes unit tests and test data, which is omitted from the PyPI package to keep it very small.

Example usage

I use TOMSO’s modules with syntax like:

from tomso import module
output = module.function(input)

As a very simple example, to load the header and profile data in an FGONG file, I use:

from tomso import fgong
glob, var = fgong.load_fgong('model.fgong')

The APIs below give a complete list of available functions.


  • Earl Bellinger, who showed me how to read Fortran binary files in Python, without which most of the ADIPLS module would be impossible.
  • Vincent Böning, who extended adipls.load_amde to read output with inomde=2 or 3.