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
from sympy import * | |
from astropy.constants import G | |
import astropy.units as u | |
G = G.to(u.m**3 / (u.solMass * u.s**2)) | |
f_rhs = lambda P, K, e: (P * K**3 * (1 - e**2)**(3/2)) / (2 * pi * G.value) | |
f_lhs = lambda m1, m2, i: (m2**3 * sin(i)) / (m1 + m2)**2 | |
# the earth |
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
sh downloadRequestNNNNNNscript.sh -X "-P 8 -L 1" |
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
# https://www.aanda.org/67-author-information/frequent-abbreviations | |
name_abbrv = { | |
'Astronomy and Astrophysics': 'A&A', | |
'Astronomy & Astrophysics': 'A&A', | |
'Monthly Notices of the Royal Astronomical Society': 'MNRAS', | |
'The Astrophysical Journal': 'ApJ', | |
'The Astronomical Journal': 'AJ', | |
'Publications of the Astronomical Society of the Pacific': 'PASP', | |
'Annual Review of Astronomy and Astrophysics': 'ARA&A' , |
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
#!/bin/sh | |
#*********************************************************************** | |
#* ESO Science Archive Facility | |
#* Programmatic Access | |
#* | |
#* Script: eso_access_phase3.sh | |
#* Shell: bash | |
#* Date: 15-Jul-2015 | |
#* Contact: archive@eso.org | |
#* Description: Script to query and download reduced data (Phase 3) |
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
Two small demonstration notebooks of how the Keplerian and transit curves respond to a change in the parameters. |
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
import contextlib | |
import os | |
@contextlib.contextmanager | |
def working_directory(path): | |
""" | |
A context manager which changes the working directory to the given | |
path, and then changes it back to its previous value on exit. | |
""" | |
prev_cwd = os.getcwd() |
- Create a file
~/.pythonrc.py
- Add
try:
from IPython import get_ipython
get_ipython().run_line_magic('load_ext', 'autoreload')
get_ipython().run_line_magic('autoreload', '2')
except AttributeError:
pass
OlderNewer