Skip to content

Instantly share code, notes, and snippets.

@roban
Created April 15, 2012 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roban/2393834 to your computer and use it in GitHub Desktop.
Save roban/2393834 to your computer and use it in GitHub Desktop.
make a plot of stellar lifetime versus mass using enrichpy
# paste this into an "ipython --pylab" session
# You'll need EnrichPy: http://roban.github.com/EnrichPy/
import enrichpy.lifetime
mass = logspace(-1,4,300)
tlife = enrichpy.lifetime.main_sequence_life_K97(mass)
plot(mass, tlife)
xscale('log')
yscale('log')
xlabel('mass (solar masses)')
ylabel('stellar lifetime (years)')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment