GithubHelp home page GithubHelp logo

fabianhervaspeters / easygalaxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cmancone/easygalaxy

0.0 0.0 0.0 11.34 MB

Easy Galaxy: A Flexible Interface for Stellar Population Synthesis Models

License: MIT License

Python 100.00%

easygalaxy's Introduction

EzGal

EzGal calculates observables (apparent magnitude, absolute magnitude, k-corrections, e-corrections, masses, mass-to-light-ratios, and distance moduli) of stellar populations as a function of redshift, given the formation redshift. It can also generate spectral-energy distributions (SEDs) of complex-stellar populations (CSPs) from simple-stellar populations (SSPs). It takes as a primary input grids of SEDs as a function of age which can be read from plain text files, the Bruzual and Charlot binary ised files, and its own format stored in binary fits tables. It can pre-grid observables as a function of redshift and formation redshift and store the results in its own fits files to perform quick lookups later.

Install

pip install ezgal

Example Usage

import ezgal
from pylab import *

# load an EzGal model file
model = ezgal.model( 'bc03_ssp_z_0.02.fits' )

# get a grid of redshifts out to the desired formation redshift
zf = 3
zs = model.get_zs( zf )

# plot mass-to-light ratio evolution versus redshift for three filters
plot( zs, model.get_rest_ml_ratios( zf, filters='sloan_i', zs=zs ), 'k-', label='Sloan i' )
plot( zs, model.get_rest_ml_ratios( zf, filters='ks', zs=zs ), 'r--', label='2MASS Ks' )
plot( zs, model.get_rest_ml_ratios( zf, filters='ch2', zs=zs ), 'b:', label='IRAC ch2' )

# and set labels for the plot
xlabel( 'z' )
ylabel( 'M/L Ratio' )

# how about a legend?
legend()

# all done
show()

Which makes:

alt tag

API

Full API documentation can be viewed online in html and pdf formats.

Testing

python test.py

Contributors

Conor Mancone and Anthony Gonzalez

Acknowledgements

We gratefully acknowledge the authors of the primary model sets included in this project for giving us permission to redistribute their work in this way. We especially thank Charlie Conroy, Maurizio Salaris, Santi Cassisi, St´efane Charlot, Gustavo Bruzual, and Claudia Maraston for their input on this project. We are also grateful to our many collaborators - Adam Stanford, Peter Eisenhardt, Yen-Ting Lin, Greg Snyder, and others who have tested EzGal extensively and provided us with invaluable feedback.

License

MIT

easygalaxy's People

Contributors

cmancone avatar boada avatar

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.