|Durham Atomic and Molecular Physics|
Below is a selection of codes I have written - feel free to use these, let me know if there are any bugs / ways to improve the code. Also, if the link is broken but you want the code e-mail me - .
Below are functions for calculating Wigner symbols and Clebsch-Gordan coefficients for calculating angular dipole matrix elements. These functions use Stirlings law for large factorials to avoid getting 'Inf' from Matlab above 170!. Equations are taken from 'Angular Momentum:Techniques in Quantum Mechanics' by V. Devanathan and 'Angular Momentum: An Illustrated guide to Rotational Symmetries for Physical Systems' by W. J. Thompson.
This package contains tools for performing a weighted fit to a set of (x,y) data with y errorbars. This is done using a chi-squared minimisation to optimise the fit parameters. This can be done using one of three functions:
Two example programs are included, linear_fit_example.m which shows how to use all three algorithms for fitting the sample data provided, and curve_fit_example.m which fits a Lorentzian to a different sample data set. I have included some fitting functions (lorentzian.m,gaussian.m,voigt.m,nth_order.m) which allow fitting to various functions or an nth-order polynomial, but it is very easy to define an arbitary function as long as it has the arguments 'y=arb_fun(x,p)' where p is a 1D array of fit parameters. For more information on curve fitting try 'Data Reduction and Error Analysis for the Physical Sciences' by Bevington and Robinson or 'Measurements and their Uncertianties' by Hughes and Hase, and contact me if you have problems with the code.
In addition, plotterr.m is also included as this allows plotting data with both x and y errorbars.
This contains code for solving OBEs for two and three level atoms using Matlab integrators. The example programs calculate the result for scanning the probe laser about resonance (as done in our cold atom experiments) but is easily adapted to a scanning coupling laser or time-dependent Rabi frequencies for schemes such as STIRAP.
This contains both double precision and double complex fixed step 4th-order or adpative step 4th/5th order Runge-Kutta integrators for solving a set of ordinary differential equations. The code is derived from 'Numerical Recipes in Fortran 77', 2nd Ed. by W. H. Pres et al.. The integrators are contained in module ode_solver.f90 and comes with example programs for both the double and complex integrators.
To be added soon...
A library of subVIs to interface with DPO scopes to set triggering and acquisition settings and to read waveforms into LabVIEW. Save to folder 'labview\user.lib' to install as a user library. To use the VIs it is necessary to install the USB driver for the scope available from Tektonix.To save right-click DPO_INTERFACE.LLB and select 'save as'.
|Department of Physics, Durham University||Tel +44 (0)191 33 43520|
|Rochester Building, Science Laboratories||Fax +44 (0)191 33 45823|
|South Road, Durham DH1 3LE|
|United Kingdom||© Simon A Gardiner, Durham University 2005|