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
from utmost2d_snap import UtmostSnap | |
from rpi_bf_control import RpiBeamformerController | |
import time | |
from multiprocessing import JoinableQueue | |
from threading import Thread | |
class BoardManager(object): | |
""" Base class for multithreaded control of multiple boards | |
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 pycuda.driver as cuda | |
import pycuda.autoinit | |
from pycuda.compiler import SourceModule | |
import numpy as np | |
def compute_xcorr_cpu(d): | |
dc = d.astype('float32').view('complex64') | |
dc = dc.transpose((0,2,3,1)).copy() | |
xcorr_cpu = np.einsum('...i,...j', dc, np.conj(dc)).view('float32').astype('int32').sum(axis=-4) | |
return xcorr_cpu |
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
""" | |
# app.py - example Dash + ZMQ + msgpack + numpy monitor | |
This app receives data from zmq_pub.py, and plots it. | |
Run the app, browse to localhost:8085 in your web browser, and run zmq_pub.py in a different terminal. | |
""" | |
import dash | |
import dash_core_components as dcc | |
import dash_html_components as html |
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 | |
from astroquery.jplhorizons import Horizons | |
from datetime import datetime, timedelta | |
import pylab as plt | |
srclist = [ | |
'2015 BZ509', | |
'2011 SP25', | |
'2017 RR2', |
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
""" | |
# app.py -- Example bottle.py app showing how to embed AJAX Bokeh plots that update automatically. | |
""" | |
from bottle import * | |
from bokeh.plotting import figure | |
from bokeh.embed import components | |
from bokeh.resources import CDN | |
from bokeh.models.sources import AjaxDataSource |
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
""" | |
# quantization_efficiency.py | |
This script implements the formulas for quantization efficiency | |
as used in radio astronomy. The formulas appear in: | |
Thompson, A. R., D. T. Emerson, and F. R. Schwab (2007), | |
"Convenient formulas for quantization efficiency", | |
Radio Sci., 42, RS3022, doi:10.1029/2006RS003585. | |
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
""" | |
Parse output of nvidia-smi into a python dictionary. | |
This is very basic! | |
""" | |
import subprocess | |
import pprint | |
sp = subprocess.Popen(['nvidia-smi', '-q'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
NewerOlder