- read_ascii()
- Probably already included in astropy.ascii
- ascii_template()
- Probably already included in astropy.ascii
- ntostr() (from Erin Sheldon's sdsstools)
- It looks like this is just pure Python...
- helcorr.pro
- This will be included in the coordinates subpackage (astropy.coordinates)
- glactc.pro
- This will be included in the coordinates subpackage (astropy.coordinates)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# x | y | sigma_y | |
---|---|---|---|
0.1029224715 | 6.1523941226 | 0.1816047467 | |
0.1719426056 | 6.1203735252 | 0.2797154059 | |
0.2261364446 | 6.0386732469 | 0.1232469666 | |
0.2322520636 | 6.0468432274 | 0.4025523066 | |
0.2904180608 | 6.2151388619 | 0.0880203776 | |
0.3252579649 | 5.7345903217 | 0.6583423380 | |
0.4424625103 | 6.2595326795 | 0.3846405824 | |
0.4883605700 | 6.4047751371 | 0.1488420104 | |
0.6101911742 | 6.4503687020 | 0.0235317241 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* make the selected cell more obvious */ | |
div.cell.selected { | |
background: #ECF0F1; | |
} | |
/* make a cell in edit mode *really* obvious */ | |
div.cell.selected.edit_mode > div.input > div.input_prompt { | |
color: #ECF0F1; | |
background: rgb(83, 144, 107); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$([IPython.events]).on('app_initialized.NotebookApp', function(){ | |
// Try to read JSON file specifying cell macros | |
$.getJSON("/static/custom/macros.json", function(data) { | |
var pickTemplateLabel = $("<span></span>") | |
.attr("class", "navbar-text") | |
.text("Cell Macro:"); | |
var pickTemplate = $("<select></select>").attr("id", "pick_template"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import cPickle as pickle | |
def some_function(another_function, overwrite=False, *args, **kwargs): | |
if overwrite: | |
os.remove("somefilename.pickle") | |
if not os.path.exists("somefilename.pickle"): | |
# analysis / make object | |
object = another_function(*args, **kwargs) |
List all subfolders that are git repositories within a specified path. Displays a check mark next to repositories that are up to date with origin/master. Displays a red x next to repositories with commits waiting to be pushed. Right now just compares local master branch to origin/master.
I put this in ~/bin/
, then add this line to my bash profile:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib as mpl | |
import matplotlib.pyplot as pl | |
with mpl.rc_context(rc={'font.family': 'Sans Serif'}): | |
fig,ax = pl.subplots(1,1,figsize=(6,4)) | |
ax.set_title(mpl.__version__) | |
ax.set_xscale('log') | |
ax.set_yscale('log') | |
ax.set_xlabel("test $10^5$") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from astropy.table import Table | |
from astropy.io import ascii | |
IDs = [1, 3, 6, 9, 100] | |
names = ["cat", "bat", "rat", "mat", "gnat"] | |
scores = [83, 51, 77, 81, 92] | |
t = Table([IDs, names, scores], names=["ID", "name", "score"]) | |
ascii.write(t, delimiter=",") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Make a figure to visualize using MCMC (in particular, the Python package | |
emcee) to infer 4 parameters from a parametrized model of the Milky Way's | |
dark matter halo by using tracer stars from the Sagittarius Stream. | |
If you're unfamiliar with the jargon here (walkers, Sgr, etc.), check out: | |
- Law & Majewski 2010 | |
http://iopscience.iop.org/0004-637X/714/1/229/pdf/apj_714_1_229.pdf | |
- emcee | |
http://dan.iel.fm/emcee/ |
OlderNewer