Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
a99bee6
Update LabView Code/FPGA code/Microsphere feedback.aliases
FernandoMonteiro1000 Oct 25, 2018
332118e
hdf5 files
microspheres Oct 25, 2018
c7cd3d0
minor updates
FernandoMonteiro1000 Oct 25, 2018
1feaf40
Merge remote-tracking branch 'origin/setup1' into setup2
FernandoMonteiro1000 Oct 25, 2018
a239b1b
Updated fpga target
FernandoMonteiro1000 Dec 14, 2018
91334ba
new bitfile
FernandoMonteiro1000 Dec 14, 2018
d1e94ab
daq_working
FernandoMonteiro1000 Dec 18, 2018
e1cbee6
Update plot_data_quick.py
FernandoMonteiro1000 Dec 18, 2018
d67e540
Update MultiChannelFeedbackCooling_aod_feedback(Host)_PIDXYZ_laserPID.vi
FernandoMonteiro1000 Jan 2, 2019
37b3238
Update MultiChannelFeedbackCooling_aod_feedback(Host)_PIDXYZ_laserPID.vi
FernandoMonteiro1000 Jan 2, 2019
0affaea
fitpsd
FernandoMonteiro1000 Jan 4, 2019
bc311cb
feedback_working
FernandoMonteiro1000 Jan 8, 2019
a03e6a6
plot_multiple is working and daq uses the scope
FernandoMonteiro1000 Jan 9, 2019
2fec081
plot_multiple more efficient
FernandoMonteiro1000 Jan 9, 2019
ba654ff
1/11/19
FernandoMonteiro1000 Jan 11, 2019
a9e8214
more_python
FernandoMonteiro1000 Jan 15, 2019
efc49e4
20190116
FernandoMonteiro1000 Jan 16, 2019
f95bc9e
20160118
FernandoMonteiro1000 Jan 18, 2019
60bc4d1
20180118
FernandoMonteiro1000 Jan 18, 2019
ef0fbdb
20180118
FernandoMonteiro1000 Jan 18, 2019
f97651c
pressures vi
FernandoMonteiro1000 Jan 23, 2019
65d849f
pressures vi
FernandoMonteiro1000 Jan 23, 2019
9a4edd8
pressures
FernandoMonteiro1000 Jan 24, 2019
ee97933
test_gwintek
FernandoMonteiro1000 Jan 25, 2019
ba3bc18
daq
FernandoMonteiro1000 Jan 25, 2019
c2cf8aa
20190131
FernandoMonteiro1000 Jan 31, 2019
bee541c
COM_temp FPGA and host
FernandoMonteiro1000 Jan 31, 2019
b5a13c3
fpga and daq updates for com measurement
FernandoMonteiro1000 Feb 1, 2019
8bec38a
python_COM_temp
FernandoMonteiro1000 Feb 5, 2019
e8b27d5
Update COM_temperature.py
FernandoMonteiro1000 Feb 5, 2019
a115192
Update COM_temperature.py
FernandoMonteiro1000 Feb 5, 2019
cc6bc45
Update feedback_onoff.py
FernandoMonteiro1000 Feb 5, 2019
a297409
Update feedback_onoff.py
FernandoMonteiro1000 Feb 6, 2019
90bd324
feedback_on_off python
FernandoMonteiro1000 Feb 6, 2019
0979986
feedback_on_off
FernandoMonteiro1000 Feb 6, 2019
911fc5b
fpga integral gains
FernandoMonteiro1000 Feb 15, 2019
9bc6f2c
532_1064_leak python
FernandoMonteiro1000 Feb 18, 2019
c94226e
fpga
FernandoMonteiro1000 Feb 22, 2019
d4d4305
daq-fpga
FernandoMonteiro1000 Feb 25, 2019
0edfdbd
more
FernandoMonteiro1000 Mar 1, 2019
33d18ad
march26
FernandoMonteiro1000 Mar 26, 2019
91952fa
unbug_volt_to_meter... python
FernandoMonteiro1000 Apr 1, 2019
0071b86
april3
FernandoMonteiro1000 Apr 3, 2019
dc0c0c0
better feeedback_on_off python
FernandoMonteiro1000 Apr 4, 2019
164e119
april11
FernandoMonteiro1000 Apr 11, 2019
63338b7
droplets
FernandoMonteiro1000 May 17, 2019
230f753
drops
FernandoMonteiro1000 May 21, 2019
7ef029c
20192806
FernandoMonteiro1000 Jun 28, 2019
40cc981
daq chan 7 and code for torque noise
FernandoMonteiro1000 Aug 2, 2019
3f34a6d
EOM_sine_wave_fpga
FernandoMonteiro1000 Aug 6, 2019
cf82dc1
august 30
FernandoMonteiro1000 Aug 30, 2019
a81dc3d
yukawa_folder
FernandoMonteiro1000 Aug 30, 2019
621093b
august30
FernandoMonteiro1000 Aug 30, 2019
2dab544
new temp and acc code
FernandoMonteiro1000 Dec 14, 2019
e4a1145
20191217
FernandoMonteiro1000 Dec 17, 2019
b0dde53
20191220
FernandoMonteiro1000 Dec 20, 2019
75d7117
jan3 2020
FernandoMonteiro1000 Jan 3, 2020
ce4adcc
all code for paper 2020
FernandoMonteiro1000 Jan 30, 2020
8414f62
feb1
FernandoMonteiro1000 Feb 5, 2020
1d3c454
1
FernandoMonteiro1000 Feb 7, 2020
f9e5a4f
20200318
FernandoMonteiro1000 Mar 18, 2020
56e9a49
new dropper plus some other
FernandoMonteiro1000 Aug 12, 2020
75a1f47
20201202
FernandoMonteiro1000 Dec 2, 2020
db11d0b
Fixed broken labview
FernandoMonteiro1000 Jul 28, 2021
22445db
Laview_save_accumulator_fixed
FernandoMonteiro1000 Oct 22, 2021
b6e5185
Update BeadCoolerFixedZ(SubVI).vi
FernandoMonteiro1000 Nov 11, 2021
5ed4786
Update feedback(Host)_PIDXYZ_laserPID_COMTEMP.vi
FernandoMonteiro1000 Nov 11, 2021
ade327b
Update (FPGA)_PIDXYZ_laserPID)_COMtemp2.vi
FernandoMonteiro1000 Nov 11, 2021
fc44e36
Create Microspherefeedb_FPGATarget2_(FPGA)PIDXYZlase_Y-TtBVY85Jw20211…
FernandoMonteiro1000 Nov 11, 2021
6c75aab
Update Microsphere_Control.aliases
FernandoMonteiro1000 Nov 11, 2021
fc44cfb
Update Microsphere feedback.aliases
FernandoMonteiro1000 Nov 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified LabView Code/DAQ/DAQ.vi
Binary file not shown.
Binary file modified LabView Code/DAQ/Get Full Terminal Name.vi
Binary file not shown.
Binary file modified LabView Code/DAQ/arange (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/boolean_run_tilt_stage.vi
Binary file not shown.
Binary file modified LabView Code/DAQ/change_voltages_in_process_list.vi
Binary file not shown.
Binary file modified LabView Code/DAQ/check_folder (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/check_if_should_flash (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/clean_up_data_tasks (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/clean_up_instruments (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/create_file_name (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/create_process_list (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/dipole_voltage_control(Sub VI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/dipole_voltage_control_logic(SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/flash_lamp (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/initialize_instruments (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/make_synth_array (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/make_tilt_stage_array (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/name_dipole_voltage.vi
Binary file not shown.
Binary file modified LabView Code/DAQ/read_data (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/save_data (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/set_dipole_voltage.vi
Binary file not shown.
Binary file modified LabView Code/DAQ/set_instruments (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/take_data (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/DAQ/variable_steps_logic.vi
Binary file not shown.
Binary file modified LabView Code/Examples/Tilt Stage/Command VIs/SetAcceleration.vi
Binary file not shown.
Binary file modified LabView Code/Examples/Tilt Stage/Command VIs/SetVelocity.vi
Binary file not shown.
Binary file modified LabView Code/Examples/Tilt Stage/Device VIs/DeviceOpen.vi
Binary file not shown.
Binary file not shown.
Binary file modified LabView Code/Examples/Tilt Stage/Device VIs/InitSingleDevice.vi
Binary file not shown.
Binary file modified LabView Code/FPGA code/FPGA Bitfiles/EOM.vi
Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion LabView Code/FPGA code/Microsphere feedback.aliases
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[My Computer]
My Computer = "192.168.1.3"
My Computer = "169.254.107.234"

2 changes: 1 addition & 1 deletion LabView Code/FPGA code/Microsphere feedback.lvlps
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[ProjectWindow_Data]
ProjectExplorer.ClassicPosition[String] = "165,1005,935,1796"
ProjectExplorer.ClassicPosition[String] = "274,808,1042,1599"

346 changes: 149 additions & 197 deletions LabView Code/FPGA code/Microsphere feedback.lvproj

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added LabView Code/FPGA code/newgauge.vi
Binary file not shown.
Binary file added LabView Code/Gwinstek_chan_1_2.vi
Binary file not shown.
Binary file added LabView Code/Gwinstek_chan_1_2_sub.vi
Binary file not shown.
Binary file added LabView Code/Gwinstek_sub.vi
Binary file not shown.
2 changes: 1 addition & 1 deletion LabView Code/Microsphere_Control.aliases
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[My Computer]
My Computer = "192.168.1.3"
My Computer = "169.254.107.234"

2 changes: 1 addition & 1 deletion LabView Code/Microsphere_Control.lvlps
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[ProjectWindow_Data]
ProjectExplorer.ClassicPosition[String] = "275,1027,681,1399"
ProjectExplorer.ClassicPosition[String] = "86,345,873,880"

57 changes: 37 additions & 20 deletions LabView Code/Microsphere_Control.lvproj

Large diffs are not rendered by default.

Binary file added LabView Code/TIC Query Command daq.vi
Binary file not shown.
Binary file added LabView Code/TIC Query Command.vi
Binary file not shown.
Binary file not shown.
Binary file added LabView Code/TIC Read Gauge Pressure or Volts.vi
Binary file not shown.
Binary file added LabView Code/Turbo Instrument Controller.llb
Binary file not shown.
Binary file modified LabView Code/VISA_Query.vi
Binary file not shown.
Binary file modified LabView Code/bead_dropper.vi
Binary file not shown.
Binary file removed LabView Code/bead_dropper_Gadi.vi
Binary file not shown.
Binary file modified LabView Code/get_position_robust (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/initialize_oscilloscope_chan1.vi
Binary file not shown.
Binary file modified LabView Code/move_tilt_stage_simpler(Sub VI).vi
Binary file not shown.
Binary file modified LabView Code/open_stage_simpler (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/open_tilt_stage_motor.vi
Binary file not shown.
Binary file modified LabView Code/oscilloscopes_Acquire_Multiple_Waveforms.vi
Binary file not shown.
Binary file added LabView Code/pressures.vi
Binary file not shown.
Binary file added LabView Code/pressures_sub.vi
Binary file not shown.
Binary file added LabView Code/read_preassures_TIC_daq.vi
Binary file not shown.
Binary file modified LabView Code/relative_move_robust (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/set_QWP.vi
Binary file not shown.
Binary file modified LabView Code/set_synth.vi
Binary file not shown.
Binary file modified LabView Code/set_tilt_stage_simpler (SubVI).vi
Binary file not shown.
Binary file modified LabView Code/sweep_Gadi.vi
Binary file not shown.
Binary file added LabView Code/test_gwintek.vi
Binary file not shown.
Binary file added h5binaries/hdf5.lib
Binary file not shown.
Binary file added h5binaries/szip.lib
Binary file not shown.
Binary file added h5binaries/zlib.lib
Binary file not shown.
Empty file added scripts/43.6
Empty file.
Empty file added scripts/49.5
Empty file.
Empty file added scripts/60.8
Empty file.
Empty file added scripts/68.7
Empty file.
Empty file added scripts/72.9
Empty file.
49 changes: 49 additions & 0 deletions scripts/AOM_characterization.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import numpy, h5py, matplotlib
import matplotlib.pyplot as plt
import os
import scipy.signal as sp
import numpy as np
import bead_util as bu
import glob

FPGAout = r"X_PM_Y_SYNTH.h5"
path = r"C:\data\AOM"

NFFT = 2**17

def getdata(fname):
print "Opening file: ", fname
## guess at file type from extension
_, fext = os.path.splitext( fname )
if( fext == ".h5"):
f = h5py.File(fname,'r')
dset = f['beads/data/pos_data']
dat = numpy.transpose(dset)
#max_volt = dset.attrs['max_volt']
#nbit = dset.attrs['nbit']
Fs = dset.attrs['Fsamp']

#dat = 1.0*dat*max_volt/nbit
dat = dat * 10./(2**15 - 1)

else:
dat = numpy.loadtxt(fname, skiprows = 5, usecols = [2, 3, 4, 5, 6] )

xpsd, freqs = matplotlib.mlab.psd(dat[:, bu.xi]-numpy.mean(dat[:, bu.xi]), Fs = Fs, NFFT = NFFT)

ypsd, freqs = matplotlib.mlab.psd(dat[:, bu.yi]-numpy.mean(dat[:, bu.yi]), Fs = Fs, NFFT = NFFT)

return [freqs, xpsd, ypsd, dat[:, bu.xi], dat[:, bu.yi]]

a = getdata(os.path.join(path, FPGAout))
t = range(len(a[3]))

print a[3]


fig = plt.figure()
plt.plot(a[3], a[4],label="PM vs synth")
plt.legend()
plt.xlabel("PM [V]")
plt.ylabel("synth [V]")
plt.show()
215 changes: 215 additions & 0 deletions scripts/COM_motion_camera.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
from PIL import Image
import glob, os
import cv2
import matplotlib.pyplot as plt
import h5py
import numpy as np
import numpy, matplotlib
import read_log_camera as rlc
import os
from scipy.signal import find_peaks
from skimage.util import img_as_ubyte, crop
from skimage.filters import threshold_otsu
from skimage.feature import register_translation
from skimage.transform import rotate
import multiprocessing as mp
import time

pathlist = [r"C:\data\20200313\two_spheres\15um_german\2\only_1_sphere", ]

#pathlist = glob.glob(os.path.join(r"C:\data\20200311\two_spheres\15um_german\3", "*", ""))
#pathlist = pathlist + glob.glob(os.path.join(r"C:\data\20200311\two_spheres\15um_german\3", "*", ""))
#pathlist = pathlist + glob.glob(os.path.join(r"C:\data\20200311\two_spheres\15um_german\4", "*", ""))

#pathlist = [r"C:\data\20200313\two_spheres\15um_german\2\1"]
#print pathlist
see_frame = False
use_threshold = True # always set True

use_rotation = True

# FB on the bottom for march 13
coorL = [33-12, 25-12, 105+12, 95+12]
coorR = [160-12, 13-12, 270+12, 90+12]

# # march 11
#coorL = [47, 35, 133, 110]
#coorR = [222, 22, 345, 98]

upsample = 100 # the result looks the same with upsample = 1000

def get_files_path(path):
file_list = glob.glob(path+"\*.tiff")
return file_list

def list_file_time_order(filelist):
filelist.sort(key=os.path.getmtime)
return filelist


def get_sub_image(name, coordinates): # this returnd the cropped images
im = Image.open(name)
left, top, right, bottom = coordinates
im = im.crop((left, top, right, bottom))
return im

def rot_special(image, angle, N_crop):
image = rotate(image*1.0, angle*1.0)
image = image[N_crop:len(image) - N_crop]
image = np.rot90(image)
image = image[N_crop:len(image) - N_crop]
image = np.rot90(image)
image = np.rot90(image)
image = np.rot90(image)
return image


# this is for displaying the image cropped
path = pathlist[0]
filelist = get_files_path(path)
filelist = list_file_time_order(filelist)
imageL = get_sub_image(filelist[400], coorL)
imageR = get_sub_image(filelist[400], coorR)
imageL = img_as_ubyte(imageL)
imageR = img_as_ubyte(imageR)
if use_threshold:
values = np.linspace(0.05, 0.5, 15)
threshL = threshold_otsu(imageL)
threshR = threshold_otsu(imageR)
imageLstat = imageL
imageRstat = imageR
imageL = np.ones(imageL.shape)
imageR = np.ones(imageR.shape)
for i in values:
imageLa = imageLstat > i*threshL
imageRa = imageRstat > i*threshR
imageL = imageL + imageLa*1.
imageR = imageR + imageRa*1.

plt.figure()
plt.imshow(imageL)

plt.figure()
if use_rotation:
imageR = rot_special(imageL, 0, 16)
plt.imshow(imageR)

if see_frame:
plt.show()
# this ends the crop view


def threshold(imageL, imageR): # returns 2 iamages with threshold
values = np.linspace(0.05, 0.5, 15)
threshL = threshold_otsu(imageL)
threshR = threshold_otsu(imageR)
imageLstat = imageL
imageRstat = imageR
imageL = np.zeros(imageL.shape)
imageR = np.zeros(imageR.shape)
for i in values:
imageLa = imageLstat > i*threshL
imageRa = imageRstat > i*threshR
imageL = imageL + imageLa*1.
imageR = imageR + imageRa*1.
return [imageL, imageR]


def positionLR(nameref, name, coorL, coorR, angle): # outputs the sphere position for each frame name
imageLref = get_sub_image(nameref, coorL)
imageRref = get_sub_image(nameref, coorR)
imageLref = img_as_ubyte(imageLref)
imageRref = img_as_ubyte(imageRref)

imageL = get_sub_image(name, coorL)
imageR = get_sub_image(name, coorR)
imageL = img_as_ubyte(imageL)
imageR = img_as_ubyte(imageR)

if use_rotation:
imageLref = rot_special(imageLref, angle, 16)
imageRref = rot_special(imageRref, angle, 16)
imageL = rot_special(imageL, angle, 16)
imageR = rot_special(imageR, angle, 16)

if use_threshold: # i think it is alwasys good that the ref image is thresholded, that is why the comment in the line below
#imageL, imageR = threshold(imageL, imageR)
imageLref, imageRref = threshold(imageLref, imageRref)

shiftL, errorL, diffphaseL = register_translation(imageLref, imageL, upsample_factor = upsample)
shiftR, errorR, diffphaseR = register_translation(imageRref, imageR, upsample_factor = upsample)

sl = shiftL[1]
sr = shiftR[1]
slx = shiftL[0]
srx = shiftR[0]

#print "L", SL
#print "R", SR

return [sl, sr, slx, srx]


def positionALL(filelist, coorL, coorR, angle): # uses positionLR to generate a timestream for a filelits of images
R = []
L = []
Rx = []
Lx = []
# a = 0
nameref = filelist[0]
for i in filelist:
l, r, lx, rx = positionLR(nameref, i, coorL, coorR, angle)
R.append(r)
L.append(l)
Rx.append(rx)
Lx.append(lx)
# print a
# a = a + 1
R = np.array(R)
L = np.array(L)
Rx = np.array(Rx)
Lx = np.array(Lx)
return [L, R, Lx, Rx]

def calculate_path(path, angle): # gets a folder, generate a filelist and saves the timestream
filelist = get_files_path(path)
filelist = list_file_time_order(filelist)

L, R, Lx, Rx = positionALL(filelist, coorL, coorR, angle)
L = L - np.mean(L)
R = R - np.mean(R)
Lx = Lx - np.mean(Lx)
Rx = Rx - np.mean(Rx)

save = [L, R, Lx, Rx]
if use_threshold:
if use_rotation:
pathsave = path + "\\timestream_with_threshold_" + str(angle) + ".npy"
else:
pathsave = path + "\\timestream_with_threshold.npy"
else:
pathsave = path + "\\timestream.npy"

np.save(pathsave, save)

print path
seconds = time.time()
local_time = time.ctime(seconds)
print "time saved: ", local_time

return []


angles = [-16, -12, -8, -4, 0, 4, 8, 12, 16]

for i in angles:
calculate_path(pathlist[0], i)

#for i in pathlist:
# calculate_path(i)

#if __name__ == '__main__':

# mp.freeze_support()
# pool = mp.Pool(processes = 1)
# pool.map(calculate_path, pathlist)
Loading