Skip to content

Instantly share code, notes, and snippets.

View kbarbary's full-sized avatar

Kyle Barbary kbarbary

View GitHub Profile
@kbarbary
kbarbary / sncosmo-demo-0.4.ipynb
Created May 16, 2014 15:04
SNCosmo v0.4 demo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kbarbary
kbarbary / fitsio-hdu-types.ipynb
Created May 25, 2014 20:08
FITSIO HDU types demo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kbarbary
kbarbary / sn-cosmology-pgm.py
Created October 13, 2014 21:18
Daft script for SN cosmology PGM
#!/usr/bin/env python
from matplotlib import rc
from daft import PGM, Node, Plate
rc("font", family="serif", size=12)
rc("text", usetex=True)
pgm = PGM([7.0, 4.2], origin=[0.5, 0.2], observed_style='inner')
@kbarbary
kbarbary / sep-demo.ipynb
Created April 21, 2015 10:30
Quick demo of SEP
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kbarbary
kbarbary / for_owen.ipynb
Created May 18, 2015 19:32
Some calculus for Owen
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kbarbary
kbarbary / refine_ellipsoids.py
Last active September 8, 2015 17:26
Ellipsoid refinement code for Nestle
def ellipsoid_dist_sq(x, ell):
"""Return the square of each point's distance from the ellipsoid center,
relative to ellipsoid boundary.
Refered to in Feroz, Hobson & Bridges (2009) as the Mahalanobis distance.
Parameters
----------
x : `~numpy.ndarray`
Points, array with shape (npoints, ndim).
@kbarbary
kbarbary / rubin_pgm.py
Created September 23, 2015 00:36
PGM for Rubin et al 2015 (http://arxiv.org/abs/1507.01602)
#!/usr/bin/env python
from matplotlib import rc
from daft import PGM, Node, Plate
rc("font", family="serif", size=12)
rc("text", usetex=True)
pgm = PGM([7.65, 5.3], origin=[0., -0.2], observed_style='inner')
@kbarbary
kbarbary / performance.py
Created June 3, 2012 17:34 — forked from astrofrog/performance.py
photutils performance
import time
import numpy as np
import photutils
from collections import OrderedDict
c = OrderedDict()
name = "Small data, single small aperture"
c[name] = {}
@kbarbary
kbarbary / estimated_ellipsoid_test.ipynb
Created November 3, 2015 13:41
Testing bounding ellipsoid in nestle
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kbarbary
kbarbary / sncosmo-fitting-example.ipynb
Created August 1, 2013 03:02
sncosmo fitting example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.