Skip to content

Instantly share code, notes, and snippets.

View keflavich's full-sized avatar

Adam Ginsburg keflavich

View GitHub Profile
@keflavich
keflavich / thesis.aux
Created April 19, 2013 17:41
Thesis log and aux files
\relax
\providecommand\zref@newlabel[2]{}
\@writefile{lof}{\contentsline {part} {\figurenameToC }{\relax }}
\@writefile{lot}{\contentsline {part} {\tablenameToC }{\relax }}
\@writefile{toc}{\contentsline {part} {\chapternameToC }{\relax }}
\providecommand \oddpage@label [2]{}
\citation{Taylor2003:CGPS}
\citation{oey:hierarchical:2005}
\citation{curtis2010}
\citation{curtis2010}
import pymc as pm
import numpy as np
# FIXME: Need to store duplicates too, when jumps are rejected. That means some mechanism
# for making sure the history is full-rank needs to be employed.
class HistoryCovarianceStepper(pm.StepMethod):
_state = ['n_points','history','tally','verbose']
@keflavich
keflavich / frame1.png
Last active December 17, 2015 02:29
Astropy fit gui example
frame1.png
import numpy as np
import fftw3
import pyfftw
import multiprocessing
import matplotlib
import matplotlib.pyplot as pl
import time
def fft_comparison_tests(size=2048, dtype=np.complex128, byte_align=False):
import functools
class class_or_instance(object):
def __init__(self, fn):
self.fn = fn
def __get__(self, obj, cls):
if obj is not None:
return lambda *args, **kwds: self.fn(obj, *args, **kwds)
else:
return lambda *args, **kwds: self.fn(cls, *args, **kwds)
import functools
class class_or_instance(object):
def __init__(self, fn):
self.fn = fn
def __get__(self, obj, cls):
if obj is not None:
return lambda *args, **kwds: self.fn(obj, *args, **kwds)
else:
return lambda *args, **kwds: self.fn(cls, *args, **kwds)
@keflavich
keflavich / testqty.py
Last active December 19, 2015 07:58
Quantity sublcassing tests
#http://stackoverflow.com/questions/17444657/how-to-prevent-numpy-from-splitting-up-an-array-like-object
class Quantity(object):
def __init__(self, value, unit):
self.unit = unit
self.value = value
def __getitem__(self, key):
return Quantity(self.value[key], unit=self.unit)
@keflavich
keflavich / g2rrl
Last active December 25, 2015 21:29
Has G2 been detected in RRLs?
{
"metadata": {
"name": "HasG2BeenDetectedInTheRadio"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@keflavich
keflavich / BolocamIRASGPA_Frequency.pdf
Last active December 27, 2015 01:39
Long wavelength Galactic Plane Survey coverage plots
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@keflavich
keflavich / SGRB2_1.3CM_fix_gal.fits
Last active December 29, 2015 17:29
Sgr B2 data: test for aplpy
This file has been truncated, but you can view the full file.