Skip to content

Instantly share code, notes, and snippets.

View keflavich's full-sized avatar

Adam Ginsburg keflavich

View GitHub Profile
@keflavich
keflavich / milkywayplot.py
Created November 29, 2012 19:20
Milky Way Plot
import numpy as np
import PIL
import matplotlib.pyplot as plt
from mpl_toolkits.axisartist.grid_helper_curvelinear import GridHelperCurveLinear
from mpl_toolkits.axisartist import SubplotHost, ParasiteAxesAuxTrans
import mpl_toolkits.axisartist.angle_helper as angle_helper
@keflavich
keflavich / prompt.sh
Last active December 10, 2015 04:48
Command prompt. Cyan host name, yellow path name, red/green git branch name if in git repo. https://github.com/keflavich/configfiles/blob/eta/.colors for the named colors
#http://glandium.org/blog/?p=170
_bold=$(tput bold)
_normal=$(tput sgr0)
function readlink() {
DIR=$1;
(cd "$DIR" && echo "$(pwd -P)")
}
@keflavich
keflavich / BGPSSpatialFilter-NoStars.ipynb
Last active December 10, 2015 06:18
ipython notebook displaying BGPS spatial filtering efforts
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@keflavich
keflavich / import.rb
Last active December 10, 2015 07:48 — forked from dnagir/import.rb
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
# usage: ruby import.rb my-blog.xml
# my-blog.xml is a file from Settings -> Basic -> Export in blogger.
data = File.read ARGV[0]
@keflavich
keflavich / SomeGalacticStructureThings.ipynb
Last active December 11, 2015 05:18
Some Galactic Structure Things
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@keflavich
keflavich / stderr.ipynb
Last active December 14, 2015 04:58
standard error determination from a randomly generated data set
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@keflavich
keflavich / image.fits
Last active December 14, 2015 05:28 — forked from cdeil/ds9_screenshot.png
SIMPLE = T / file does conform to FITS standard BITPIX = 32 / number of bits per data pixel NAXIS = 2 / number of data axes NAXIS1 = 341 / length of data axis 1 NAXIS2 = 291 / length of data axis 2 EXTEND = T / FITS dataset may contain extensions COMMENT FITS (Flexible Image Transport System) format is defined in 'AstronomyCOMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H EXTNAME = 'On ' HDUNAME = 'On ' CTYPE1 = 'GLON-CAR' / Type of co-ordinate on axis 1 CTYPE2 = 'GLAT-CAR' / Type of co-ordinate on axis 2 RADESYS = ' ' / Reference frame for RA/DEC valu
@keflavich
keflavich / images.tbl
Created February 27, 2013 19:22
Tests for astropy ipac writer
\datatype = fitshdr
| cntr | ra | dec | cra | cdec |naxis1|naxis2| ctype1 | ctype2 | crpix1 | crpix2 | crval1 | crval2 | cdelt1 | cdelt2 | crota2 |equinox | size | hdu | fname |
| int | double | double | char | char | int | int | char | char | double | double | double | double | double | double | double | double| int | int | char |
0 83.8150020 -5.4050000 05h 35m 15.60s -05d 24m 18.0s 18000 7500 RA---TAN DEC--TAN 9000.00000 3750.00000 83.8150020 -5.4050000 -1.3887872288e-05 1.3887872288e-05 0.0000000 2000.00 1080077760 1 hlsp_orion_hst_acs_strip0l_f658n_v1_drz.fits
1 83.8150000 -5.4050000 05h 35m 15.60s -05d 24m 18.0s 18000 7500 RA---TAN DEC--TAN 9000.00000 3750.00000 83.8150000 -5.40500
@keflavich
keflavich / README.md
Last active December 15, 2015 07:39
badf
"""
Match two sets of on-sky coordinates to each other.
I.e., find nearest neighbor of one that's in the other.
Similar in purpose to IDL's spherematch, but totally different implementation.
Requires numpy and scipy.
"""
from __future__ import division
import numpy as np