Skip to content

Instantly share code, notes, and snippets.

Avatar

Gregory Green gregreen

View GitHub Profile
@gregreen
gregreen / reshape_skycoord_timing.py
Last active May 3, 2017
SkyCoord.reshape Speed Test
View reshape_skycoord_timing.py
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
View Gaia sprint - extinction.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gregreen
gregreen / anki_forecast.ipynb
Last active Oct 27, 2015
Toy example of how to make a forecast for an Anki deck.
View anki_forecast.ipynb
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 Aug 29, 2015
Inverse Covariance Kernels in 1D
View cov_inv_1D.py
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 / query_argonaut.pro
Created May 1, 2015
Query Argonaut Server (for 3D Dust Map)
View query_argonaut.pro
;+
; 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 / dist_cov.py
Created May 1, 2015
Covariance Kernels
View dist_cov.py
#!/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 Apr 29, 2015
Healpy Coordinate Transformation Residuals
View coord_transform_test.py
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,