Skip to content

Instantly share code, notes, and snippets.

@amarvutha
amarvutha / rigolScope.py
Last active February 23, 2020 03:47
Header file for Rigol scope
# Read from Rigol DS1000 scope
# version 1
# 2013-12-27
import visa
import os, serial
import numpy as np
import pylab as plt
import time
@amarvutha
amarvutha / lockin-spectrum.py
Last active January 3, 2016 22:39
Spectrum analyzer, using an SR850 lock-in amplifier
# SR850 as a spectrum analyzer
# version 1, 2014-01-21
# Amar
import os
os.chdir("c:/data/googledrive/code")
import SR850
import numpy as np
import pylab as plt
@amarvutha
amarvutha / SR850-lockin.py
Last active January 3, 2016 22:39
Python interface and utility functions for SR850 lock-in amplifier.
# Talk to SR850 lockin amplifier
# version 1, 2014-01-20
# Amar
import visa
import numpy as np
from datetime import date
import time
class LIA(visa.SerialInstrument):
@amarvutha
amarvutha / RLCtuner.py
Created January 16, 2014 18:31
RLC circuit tuner with matplotlib
import matplotlib as mpl
#mpl.rc('text', usetex = True)
#mpl.rc('font',**{'family':'serif','size':16,'weight':'bold','serif':['Palatino']})
from __future__ import division
import numpy as np
from numpy import pi
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider, Button, RadioButtons
@amarvutha
amarvutha / lui.dat
Last active January 1, 2016 15:29
Diatomic molecule energy calculation with PSI4
#! Energy of LuI molecule
memory 500 mb
molecule LuI {
Lu
I 1 R
R = 1.5
}
@amarvutha
amarvutha / Positronium.ipynb
Last active December 29, 2015 18:29
Positronium calculations: IPython notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@amarvutha
amarvutha / chameleon-wrapper.py
Last active December 29, 2015 17:49
Wrapper around uChameleon2 and histogram of ADC readings
from __future__ import division
import serial
import numpy as np
import pylab as plt
from __future__ import division
import serial
import numpy as np
import pylab as plt
import numpy as np
import pylab as plt
from numpy import random as random
import matplotlib.gridspec as gridspec
N = 10000
x,y = random.normal(0,1,N),random.normal(0,3,N)
plt.figure()
@amarvutha
amarvutha / plotLogfile.py
Last active December 25, 2015 05:09
Data logger with animated plot using Matplotlib, with some bells and widgets.
# Plot log files
# version 3
# Amar
# Changes: v2: 2012/11/27: Date & time display using native matplotlib, instead of unix timestamp
# v3: 2013/10/10: Rewritten completely using matplotlib animation, and slider for selectable range
import numpy as np
import random
import os
os.chdir("c:/data/googledrive/logs")
@amarvutha
amarvutha / mixnv.py
Last active December 24, 2015 02:19
Controlling the MixNV rf generator
# Controlling the MixNV (Windfreak Technologies) rf synthesizer
# Amar Vutha
# version 1
import serial
import numpy as np
import time
usbPort = "/dev/ttyACM0"
sleepTime = 0.01