Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Rooney NanoExplorer

View GitHub Profile
View KinMS_testing.py
from KinMS import KinMS
import numpy as np
import KinMS_testsuite as kstest
#set very simple parameter values for testing
xs=1
ys=1
vs=800
nchan=80
cellsize=0.01
dv=vs/nchan
@NanoExplorer
NanoExplorer / stuff.py
Created Jul 22, 2018
a thingy that acts like a cpu monitor
View stuff.py
class animatedplot():
def __init__(self,size):
self.size=size
self.utiliz=np.ones(self.size)*np.nan
self.timearr=np.ones(self.size)*np.nan
self.fig = plt.figure()
self.ax = self.fig.add_subplot(1,1,1)
self.ln, = plt.plot(self.utiliz,self.timearr)
self.anim = FuncAnimation(self.fig,self.update,frames = np.arange(1000),