PHS3000 Optical Tweezers¶
This documents the monashspa.PHS3000.optical_tweezers
library that you will import into code used in the PHS3000 unit when performing experiment 1.3 Optical Tweezers.
- monashspa.PHS3000.optical_tweezers.cf_linearised(f, ps, initial_fc, call_show=True)[source]¶
Finds the corner frequency value for a lorentzian power spectrum
- Finds the corner frequency (\(f_c\)) of a power spectrum of the form:
\(y=\frac{a}{(f_c^2+f^2)}\)
by transforming into the logarithmic domain and determining when the spectrum is linearised.
- Parameters:
f – A 1D numpy array containing the frequency values associated with the power spectrum
ps – A 1D numpy array containing the power spectrum data (must be the same length as
f
)initial_fc – An initial guess for the corner frequency
- Keyword Arguments:
call_show – Whether to call
matplotlib.pyplot.show()
at the end of the function (prior to returning). Defaults toTrue
. Set this toFalse
if you are not using Spyder/IPython and wish your entire script to complete before showing any plots. Note, you will need to explicitly callmatplotlib.pyplot.show()
if you set this toFalse
.- Returns:
The best estimate for the corner frequency \(f_c\).
- monashspa.PHS3000.optical_tweezers.corner_freq(f, ps, initial_fc, call_show=True)[source]¶
Finds the corner frequency value for a lorentzian power spectrum
- Finds the corner frequency (\(f_c\)) of a power spectrum of the form:
\(y=\frac{a}{(f_c^2+f^2)}\) by nonlinear fitting.
- Parameters:
f – A 1D numpy array containing the frequency values associated with the power spectrum
ps – A 1D numpy array containing the power spectrum data (must be the same length as
f
)initial_fc – An initial guess for the corner frequency
- Keyword Arguments:
call_show – Whether to call
matplotlib.pyplot.show()
at the end of the function (prior to returning). Defaults toTrue
. Set this toFalse
if you are not using Spyder/IPython and wish your entire script to complete before showing any plots. Note, you will need to explicitly callmatplotlib.pyplot.show()
if you set this toFalse
.
Returns: a 1D numpy array (\(f_c\), \(uf_c\)) which contains
the best estimate for the corner frequency \(f_c\) and the uncertainty in the corner frequency \(uf_c\).
- monashspa.PHS3000.optical_tweezers.ps_load(filepath)[source]¶
Imports the power spectrum data from optical tweezers file
- Parameters:
filepath – The path to the .lvm file produced by the optical tweezers acquisition software
- Returns:
A tuple
(f, psx, psy)
wheref
is a 1D numpy array containing the frequency values associated with the power spectrums inpsx
andpsy
(which are also both 1D numpy arrays).
- monashspa.PHS3000.optical_tweezers.trap_k_theory(r, w, alpha, eccentricity, I)[source]¶
Calculates the theoretical spring constant (\(k\)) for an optical tweezers trap for specified parameters
- Calculates using the equation:
\(k=\alpha\,I_0\,\omega\,\frac{2\,\pi\,\epsilon^3}{c\,\xi^3}\left(\sqrt{\frac{\pi}{2}}\,\left(\left(\frac{\xi\,a}{\epsilon}\right)^2-1\right)\,\mathrm{exp}\left[-\frac{a^2}{2}\right]\,\mathrm{erf}\left[\frac{\xi\,a}{\sqrt{2}\,\epsilon}\right]+\frac{\xi\,a}{\epsilon}\,\mathrm{exp}\left[-\frac{a^2}{2\,\epsilon^2}\right]\right)\)
from Bechhoefer 2002. Corrects for the difference in definition of beam waist between Bechhoefer and standard laser literature_.
If the input arguments are numpy arrays, then the output will also be an array of the appropriate dimension. Otherwise a single number will be returned.
- Parameters:
r – Sphere radius (m)
w – The \(1/e^2\) radius (beam waist) of the trapping beam (m)
alpha – \(n_p^2/n_0^2 - 1\), where \(n_p\) is the refractive index of the microsphere and \(n_0\) is the refractive index of water
eccentricity – The eccentiricty of the trapping beam
I – Trapping beam intensity (W/m^2)
- Returns:
The theoretical spring constant (\(k\))
- Return type:
k