-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from VirtualPlanetaryLaboratory/dev
Dev
- Loading branch information
Showing
68 changed files
with
850 additions
and
553 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
""" | ||
This script produces a figure comparing VPLanet's various magnetic braking | ||
implementations. | ||
David P. Fleming, University of Washington, 2018 | ||
""" | ||
|
||
from __future__ import division, print_function | ||
|
||
import matplotlib.pyplot as plt | ||
import matplotlib as mpl | ||
import numpy as np | ||
import sys | ||
|
||
# Check correct number of arguments | ||
if (len(sys.argv) != 2): | ||
print('ERROR: Incorrect number of arguments.') | ||
print('Usage: '+sys.argv[0]+' <pdf | png>') | ||
exit(1) | ||
if (sys.argv[1] != 'pdf' and sys.argv[1] != 'png'): | ||
print('ERROR: Unknown file format: '+sys.argv[1]) | ||
print('Options are: pdf, png') | ||
exit(1) | ||
|
||
# Make the plot! | ||
mpl.rcParams['figure.figsize'] = (9,8) | ||
mpl.rcParams['font.size'] = 18.0 | ||
|
||
ms = ["a_matt", "a_reiners", "a_sk"] | ||
gs = ["b_matt", "b_reiners", "b_sk"] | ||
labels = ["Matt et al. (2015)", "Reiners & Mohanty (2012)", | ||
"Repetto & Nelemans (2014)"] | ||
colors = ["C0", "C1", "C2"] | ||
|
||
fig, ax = plt.subplots() | ||
|
||
# saOutputOrder Time -TotEn -TotAngMom -Luminosity -Radius Temperature -RotPer -LXUVTot RadGyra | ||
|
||
for ii in range(len(ms)): | ||
# Load in data | ||
m = np.genfromtxt("system." + ms[ii] + ".forward") | ||
g = np.genfromtxt("system." + gs[ii] + ".forward") | ||
|
||
# Plot! | ||
ax.plot(m[:,0], m[:,6], lw=3, ls="-", color=colors[ii]) | ||
ax.plot(g[:,0], g[:,6], lw=3, ls="--", color=colors[ii]) | ||
|
||
# Annotate | ||
ax.plot([500], [500], lw=3, ls="-", color="C0", label="Matt et al. (2015)") | ||
ax.plot([500], [500], lw=3, ls="-", color="C1", label="Reiners & Mohanty (2012)") | ||
ax.plot([500], [500], lw=3, ls="-", color="C2", label="Repetto & Nelemans (2014)") | ||
ax.plot([500], [500], lw=3, ls="-", color="C7", label="M = 0.1 M$_{\odot}$") | ||
ax.plot([500], [500], lw=3, ls="--", color="C7", label="M = 1 M$_{\odot}$") | ||
|
||
# Format plot | ||
ax.set_xlim(1.0e6, 5.0e9) | ||
ax.set_ylim(0.1, 70) | ||
ax.set_xscale("log") | ||
ax.set_yscale("log") | ||
ax.set_xlabel("Time [yr]") | ||
ax.set_ylabel("Rotation Period [d]") | ||
ax.legend(loc="best", fontsize=12) | ||
|
||
if (sys.argv[1] == 'pdf'): | ||
plt.savefig('MagneticBraking.pdf', bbox_inches="tight", dpi=600) | ||
if (sys.argv[1] == 'png'): | ||
plt.savefig('MagneticBraking.png', bbox_inches="tight", dpi=600) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ iDigits 6 | |
dMinValue 1e-10 | ||
bDoForward 1 | ||
bVarDt 1 | ||
dEta 0.001 | ||
dEta 0.01 | ||
dStopTime 5e9 | ||
dOutputTime 1e6 | ||
|
Oops, something went wrong.