Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jbwhit
jbwhit / HD146244.ipynb
Last active August 29, 2015 13:56
2011-05 Solar Twin
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jbwhit
jbwhit / UVES_asteroids.ipynb
Created February 11, 2014 02:50
LP Vesta Supercalibration
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jbwhit
jbwhit / HIRES_asteroids.ipynb
Created February 11, 2014 04:42
HIRES asteroids.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jbwhit
jbwhit / 2014-02-11-HDS-iodine.ipynb
Created February 11, 2014 07:13
HDS spectra iodine cell calibration.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jbwhit
jbwhit / 2014-02-23-two-slope.ipynb
Created February 23, 2014 11:54
Is this a better fit?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jbwhit
jbwhit / exposure-combine.py
Created March 3, 2014 12:13
Combine exposures together if they have a close "enough" time stamp.
name_time = []
for guts in expos:
infile, expo = guts
name_time.append((infile, dateutil.parser.parse(expo["flux_header"]["DATE"])))
stationary_list = list(name_time)
newlist = []
for infile, timestamp in stationary_list:
temp = []
for index, guts in enumerate(name_time):
@jbwhit
jbwhit / prob.py
Created March 3, 2014 14:08
Survival function.
from scipy.stats import chi2
def compare_chi2(first, second):
"""Given two dictionaries (usually simulated and actual),
return the survival probability"""
if len(first['J2000']) != len(second['J2000']):
raise Exception
return chi2.sf(np.sum((second['da'] - first['da'])**2 / second['eda']**2.0), len(first['da']) - 1)
average = keck_error.copy()
@jbwhit
jbwhit / 2014-03-17-directors-lunch.ipynb
Last active August 29, 2015 13:57
Some cool examples found in http://www.astroml.org/index.html and the corresponding book.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jbwhit
jbwhit / 2014-03-22-attached-unattached.ipynb
Last active August 29, 2015 13:57
preliminary results.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.