This file contains hidden or 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 tables | |
| def make_h5_file(dat, filename, colname, n_rows): | |
| """Make a new HDF5 table to hold numpy array data ``dat`` | |
| """ | |
| filters = tables.Filters(complevel=5, complib='zlib') | |
| h5 = tables.openFile(filename, mode='w', filters=filters) | |
| h5shape = (0,) + dat.shape[1:] | |
| h5type = tables.Atom.from_dtype(dat.dtype) |
This file contains hidden or 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 xija | |
| # Create Xija model named "dpa" (Digital Processor Assembly) | |
| mdl = xija.ThermalModel('dpa') | |
| # Add node for DPA temperature 1DPAMZT in telemetry | |
| dpamzt = mdl.add(xija.Node, '1dpamzt') | |
| simz = mdl.add(xija.SimZ) # Science Instrument Module posn | |
| pitch = mdl.add(xija.Pitch) # Sun angle w/r/t spacecraft |
This file contains hidden or 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
| core_ext = Extension('xija.core', ['xija/core.c']) | |
| setup(name='xija', | |
| version=version, | |
| description='Thermal modeling framework for Chandra', | |
| author='Tom Aldcroft', | |
| author_email='[email protected]', | |
| url='https://github.com/sot/xija', | |
| license='BSD', | |
| platforms=['any'], |
This file contains hidden or 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 gtk | |
| import numpy as np | |
| from matplotlib.figure import Figure | |
| from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg | |
| win = gtk.Window() | |
| win.connect("destroy", lambda x: gtk.main_quit()) | |
| win.set_default_size(400,300) |
This file contains hidden or 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 | |
| """ | |
| Find the sets of characters used in RST section headers. For input like | |
| :: | |
| ########## | |
| header | |
| ########## | |
| Section |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 hidden or 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 operator | |
| class Query(object): | |
| def __init__(self, name, val=None, left=None, right=None, op=None): | |
| self.name = name | |
| self.val = val | |
| self.left = left | |
| self.right = right | |
| self.op = op |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.