Giter Site home page Giter Site logo

warrickball / tomso Goto Github PK

View Code? Open in Web Editor NEW
6.0 4.0 3.0 29.79 MB

TOMSO (Tools for Models of Stars and their Oscillations) is a set of Python modules for loading and saving input and output files for and from stellar evolution and oscillation codes.

Home Page: https://tomso.readthedocs.io/

License: MIT License

Python 23.07% Gnuplot 39.99% AMPL 36.94%

tomso's Introduction

tomso: Tools for Models of Stars and their Oscillations

GitHub repo Test status License JOSS publication

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 code, stellar oscillation code or file format. tomso currently supports the FGONG format and various input/output files for ADIPLS, GYRE, MESA and STARS.

Read the full documentation at tomso.readthedocs.io.

Contributing

Something isn't working

Search the issues on GitHub and, if your problem hasn't been addressed before, open a new issue that describes what you tried to do, what you expected to happen and what happened instead. In case it's helpful, include your operating system, Python version and NumPy version. Also try to include a minimal working example, including the files (or parts thereof) that are causing the problem.

I found a bug and wrote a patch to fix it

If you've found the problem is something in tomso that doesn't work as it should and fixed it yourself, great! Open a pull request that describes what the problem was and how your patch fixes it.

I want tomso to support my favourite file format

Open an issue with links to the specification of the file format or where I can find (or create) examples with which to test new code. I have limited time to extend tomso's features unless it happens to align with research I'm doing but I'll try my best to implement something.

Contributors

tomso's People

Contributors

warrickball avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tomso's Issues

Mesa history files dont handle retries, backups and restarts

data = np.genfromtxt(lines[5:], names=True)

Hi,
I noticed you history reading code is missing the ability to remove retries, backups and restarts (from photos) which usually messes up plots when the model number suddenly goes backwards for a bit :)

This chunk of code is adapted from my mesa reading code, its untested with yours but should be a good starting point:

data=data[data['model_number']<=data['model_number'][-1]] # get all model numbers less than the last model    number (fixes issue if last model was from a restart and has a lower number than max(model_number)
mod_rev=data['model_number'][::-1] # Reverse array of elements
mod_uniq,mod_ind=np.unique(mod_rev,return_index=True) # This will return the index of the first unique model number, but as we reversed the array previously this is the last point in the array with this model number
data=data[np.size(data['model_number'])-mod_ind-1] # Flip the reversed index back to "normal" index

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.