Skip to content

Instantly share code, notes, and snippets.

View jonathansick's full-sized avatar

Jonathan Sick jonathansick

View GitHub Profile
@jonathansick
jonathansick / jsick.py
Created November 29, 2012 23:16 — forked from dfm/jsick.py
for jsick
#!/usr/bin/env python
import numpy as np
import emcee
class ProbWrapper(object):
def __init__(self, f):
super(ProbWrapper, self).__init__()
self._f = f
@jonathansick
jonathansick / gal_radii_pb.py
Last active April 5, 2024 18:23 — forked from PBarmby/gal_radii_pb.py
Compute deprojected galactocentric distance using astropy.coordinates. (By @PBarmby)
from astropy.coordinates import ICRS, Distance, Angle
from astropy import units as u
import numpy as np
def correct_rgc(coord, glx_ctr=ICRS('00h42m44.33s +41d16m07.5s'),
glx_PA=Angle('37d42m54s'),
glx_incl=Angle('77.5d'),
glx_dist=Distance(783, unit=u.kpc)):
"""Computes deprojected galactocentric distance.