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 glue import core | |
from glue.core.data_factories import auto_data, tabular_data | |
from glue.core.link_helpers import Galactic2Equatorial, MultiLink | |
from glue.qt.glue_application import GlueApplication | |
from convert_xyz import galactic2xyz | |
# Load data from files | |
d = tabular_data('irdcs.fits') | |
d.label = "IRDC Catalog" |
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
""" | |
An attempt to embed an IPython Qt Terminal widget in-process | |
Current Behavior | |
---------------- | |
1) Multiple widgets can be instantiated | |
2) Each widget shares the same namespace (and underlying kernel) |
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 matplotlib import cm | |
import numpy as np | |
from PyQt4.QtGui import QImage, QPixmap, QColor | |
def cmap2pixmap(cmap, steps=50): | |
"""Convert a maplotlib colormap into a QPixmap | |
:param cmap: The colormap to use | |
:type cmap: Matplotlib colormap instance (e.g. matplotlib.cm.gray) |
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
pro writecol, file, c1, c2 | |
openw, lun, file, /get | |
for i = 0, n_elements(c1) - 1, 1 do begin | |
printf, lun, c1[i], c2[i], format='(d, ", ", d)' | |
endfor | |
free_lun, lun | |
end | |
pro generate_j2000_points | |
seed = 42 |
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 the numba examples | |
(https://github.com/numba/numba/blob/master/examples/mandel.py), | |
but tweaked to recalculate on the fly as the viewport changes""" | |
from numba import autojit | |
import numpy as np | |
from pylab import imshow, jet, show, ion | |
import matplotlib.pyplot as plt | |
from matplotlib import rcParams | |
rcParams['image.origin'] = 'lower' |
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 PyQt4.QtGui import QApplication, QMainWindow, QDockWidget | |
from PyQt4.QtCore import Qt | |
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg | |
from matplotlib.backends.backend_qt4 import NavigationToolbar2QT | |
from matplotlib.figure import Figure | |
a = QApplication(['']) | |
w = QMainWindow() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 subprocess import check_call | |
#remove build directory | |
check_call('rm -rf build'.split()) | |
#compile and capture stdout | |
with open('build.log', 'w') as log: | |
check_call('python setup.py install --user'.split(), stdout=log) | |
log = open('build.log').read().splitlines() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer