Skip to content

Instantly share code, notes, and snippets.

View gregreen's full-sized avatar

Gregory Green gregreen

View GitHub Profile
@gregreen
gregreen / reshape_skycoord_timing.py
Last active May 3, 2017 02:39
SkyCoord.reshape Speed Test
from __future__ import print_function, division
import timeit
import numpy as np
# First, test how long it takes to reshape a numpy array
repeat = 20
number = 100000
@gregreen
gregreen / Gaia sprint - extinction.ipynb
Last active October 17, 2016 18:24
Gaia-extinctions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gregreen
gregreen / query_argonaut.pro
Created May 1, 2015 15:19
Query Argonaut Server (for 3D Dust Map)
;+
; NAME:
; query_argonaut
;
; PURPOSE:
; Query the Argonaut server for 3D dust information or SFD
;
; CALLING SEQUENCE:
; qresult = query_argonaut(/struct, /debug, _extra=coords)
;
@gregreen
gregreen / anki_forecast.ipynb
Last active October 27, 2015 21:04
Toy example of how to make a forecast for an Anki deck.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gregreen
gregreen / cov_inv_1D.py
Last active August 29, 2015 14:21
Inverse Covariance Kernels in 1D
import numpy as np
import matplotlib
matplotlib.rc('text', usetex=True)
import matplotlib.pyplot as plt
# Properties of kernel
a = 0. # Coeff. on Gaussian term (exponential term gets 1-a)
ell = 2. # Exponential correlation length
sigma = 1. # Gaussian std. dev. parameter
@gregreen
gregreen / dist_cov.py
Created May 1, 2015 03:38
Covariance Kernels
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# dist_cov.py
#
# Copyright 2015 Gregory M. Green
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@gregreen
gregreen / coord_transform_test.py
Created April 29, 2015 18:38
Healpy Coordinate Transformation Residuals
import healpy as hp
import numpy as np
import matplotlib
matplotlib.rc('text', usetex=True)
import matplotlib.pyplot as plt
euler_transf_index = {
'CG': 1,
'GC': 2,