Created
April 15, 2012 16:54
-
-
Save roban/2393834 to your computer and use it in GitHub Desktop.
make a plot of stellar lifetime versus mass using enrichpy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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