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 astropy.io.fits | |
import astropy.table | |
import astropy.io.registry | |
class I3Table(astropy.table.Table): | |
""" Im3shape table class. Same as a standard table except it supports | |
attribute style column access ("table.e1") and does not try to print itself | |
out when repr'd interactively. | |
""" |
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
#!/usr/bin/env python | |
"""strip outputs from an IPython Notebook | |
Opens a notebook, strips its output, and writes the outputless version to the original file. | |
Useful mainly as a git filter or pre-commit hook for users who don't want to track output in VCS. | |
This does mostly the same thing as the `Clear All Output` command in the notebook UI. | |
LICENSE: Public Domain |
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 numpy as np | |
N = 5000 | |
I_true = np.random.randn(N) | |
D = I_true[:, None] - I_true[None, :] | |
I0 = np.zeros_like(I_true) | |
eta = 1.0 / N # Learning rate. | |
tol = 1.25e-11 # Error tolerance. |