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
import numpy as np | |
from matplotlib import pyplot as plt | |
import oscaar | |
## Define system parameters for planet Earth, pulled from Wolfram Alpha | |
## Limb-darkening coeffs loosely based on Sanchez-Bajo et al. (2002) http://iopscience.iop.org/0143-0807/23/3/311 | |
RpOverRs = 6367.5/695500.0 ## R_p/R_s = ratio of planetary radius to stellar radius | |
aOverRs = 1.49597887e8/695500.0 ## a/R_s = ratio of semimajor axis to stellar radius | |
period = 365.25 ## Period [days] | |
inclination = 90.0 ## Inclination [degrees] |
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
import numpy as np | |
import cPickle | |
import os | |
data = np.random.random(10) | |
## Simulate behavior of oscaar.IO.save() | |
outputName = "null\\0test.pkl" | |
output = open(outputName, 'wb') | |
cPickle.dump(data, output) |
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
''' | |
Downloads, unpacks and "pickles" (saves a python binary) of the exoplanets.org | |
planet database, saves the data in nested dictionaries. | |
For exoplanets.org's parameter field keywords, see Table 1 of | |
Wright et al. 2011: http://arxiv.org/pdf/1012.5676v3.pdf | |
Brett Morris | |
''' |
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
''' | |
Downloads, unpacks and "pickles" (saves a python binary) of the exoplanets.org | |
planet database, saves the data in nested dictionaries. | |
For exoplanets.org's parameter field keywords, see Table 1 of | |
Wright et al. 2011: http://arxiv.org/pdf/1012.5676v3.pdf | |
Brett Morris | |
''' |
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.
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 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
""" | |
Recipe for calculating which bright exoplanets will be transiting tonight and | |
visible from Apache Point Obsevatory. | |
""" | |
from __future__ import (absolute_import, division, print_function, | |
unicode_literals) | |
from astropy.time import Time | |
from astroplan import Observer, get_site, Exoplanets |
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
from astroplan import Observer, FixedTarget | |
from astroplan.constraints import (is_observable, is_always_observable, | |
AltitudeConstraint, AirmassConstraint, | |
AtNight) | |
from astropy.time import Time | |
import astropy.units as u | |
import numpy as np | |
time_range = Time(["2015-01-01", "2015-01-03"]) | |
subaru = Observer.at_site("Subaru") |
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
class SeparationConstraint(Constraint): | |
""" | |
Constrain the separation between one target and another target. | |
""" | |
def __init__(self, separation_target_function, separation_target_args=[], | |
min=None, max=None): | |
""" | |
Parameters | |
---------- |
OlderNewer