Skip to content

Instantly share code, notes, and snippets.

View eteq's full-sized avatar

Erik Tollerud eteq

View GitHub Profile
@eteq
eteq / astropy-modeling-uncertainties.ipynb
Last active November 22, 2023 15:36
Some simple examples of extracting uncertainties from astropy.modeling
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eteq
eteq / apj_short_prop.bst
Created March 1, 2013 20:12
A modified version of the apj latex/bibtex bst file for funding/observing proposals where there is very little space.
%%This is often best used in a latex file in two-column mode. To do that, do:
%%
%%\usepackage{multicol} % before \begin{document}
%% ... document ...
%%\begin{multicols}{2}
%%\bibliography{filename}{}
%%\bibliographystyle{apj_short_prop}
%%\end{multicols}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eteq
eteq / Astropy Eclipse 2017.ipynb
Last active September 5, 2021 09:39
An example of using Astropy to plan your Great American Eclipse timing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eteq
eteq / parallax_GaiaDR2.ipynb
Last active June 15, 2021 00:37
An demonstration of parallax using stars near the sun from the Gaia mission, astropy, astroquery, and matplotlib.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
import sys
sys.path.insert(0, '/Users/bmorris/git/tmp/astropy')
import astropy
from astropy.time import Time
from astropy.coordinates import (SkyCoord, Longitude, Latitude, GCRS, ICRS,
@eteq
eteq / xkeckhelio.py
Created February 21, 2013 00:02
Heliocentric correction code for Keck observatory, based on an idl procedure from XIDL
#This is a mostly literal port of x_keckhelio.pro from XIDL (http://www.ucolick.org/~xavier/IDL/)
from __future__ import division
from math import pi
from numpy import cos, sin
import numpy as np
def x_keckhelio(ra, dec, epoch=2000.0, jd=None, tai=None,
longitude=None, latitude=None, altitude=None, obs='keck'):
"""