atomcloud.analysis package
Submodules
Module contents
Created on Mon Mar 14 19:26:59 2022
@author: hofer
- atomcloud.analysis.all_axis_scales(lambd, xpixel_length, ypixel_length, magnification=1)[source]
Calculates the scaling values along all three axes.
- Parameters:
lambd (float) – wavelength of the laser beam in meters
xpixel_length (float) – x axis length of a pixel in meters
ypixel_length (float) – y axis length of a pixel in meters
magnification (float) – magnification of the imaging setup
- Returns:
scale factor for the image on the pixel axes
- Return type:
tuple[dict[str, float], list[str]]
- atomcloud.analysis.calc_chi_squared(num_parameters, actual_data, fit_data, sigma=None)[source]
Calculates the chi squared value and the reduced chi squared value for a fit.
- Parameters:
num_parameters (int) – The number of parameters in the fit.
actual_data (ndarray) – The actual data that was fit.
fit_data (ndarray) – Fit corresponding to original coord points based on fit parameters.
sigma (ndarray | None) – The standard deviation of the data can be used to weight the chi squared value.
- Returns:
The chi squared value and the reduced chi squared value.
- Return type:
list[float]
- atomcloud.analysis.cloud_temperature(sigma, mass, tof, trap_freq=None)[source]
- Parameters:
sigma (float) –
mass (float) –
tof (float) –
trap_freq (float | None) –
- Return type:
float
- atomcloud.analysis.convert_atom_number(atom_number, xscale, yscale, zscale)[source]
Rescale integrated values
- Parameters:
atom_number – number of atoms
xscale (float) – scale factor for x axis
yscale (float) – scale factor for y axis
zscale (float) – scale factor for z axis
- Returns:
rescaled atom number
- atomcloud.analysis.img_axis_scales(xpixel_length, ypixel_length, magnification=1)[source]
Calculates the scaling values along the image axes.
- Parameters:
xpixel_length (float) – x axis length of a pixel in meters
ypixel_length (float) – y axis length of a pixel in meters
magnification (float) – magnification of the imaging setup
- Returns:
scale factor for the image on the pixel axes
- Return type:
tuple[float, float]
- atomcloud.analysis.od_nd_scale(optical_cross_section)[source]
Calculates the conversion from optical density to atom number density.
- Parameters:
optical_cross_section (float) – optical cross section of the laser beam
- Returns:
atom number density
- atomcloud.analysis.optical_cross_section(lambd)[source]
Calculate the optical cross section of a laser beam on resonance.
- Parameters:
lambd (float) – wavelength of the laser beam in meters
- Returns:
optical cross section in m^2
- Return type:
float
- atomcloud.analysis.pixel_scale(pixel_length, magnification=1.0)[source]
Calculates the image scaling value if we’re only moving from pixels to meters. Includes the magnification factor of the imaging setup.
- Parameters:
pixel_length (float) – length of a pixel in meters
magnification (float) – magnification of the imaging setup
- Returns:
scale factor for the image on the pixel axis
- Return type:
float
- atomcloud.analysis.rescale_1d_params(params, z_indices, x_indices, xscale, zscale)[source]
Rescale fit parameters in a 1d function
- Parameters:
params (list[float]) – list of function parameters
zinds – list of indices which are scaled by zscale
xinds – list of indices which are scaled by xscale
xscale (float) – scale to rescale x parameters by
zscale (float) – scale to rescale z parameters by
z_indices (list[int]) –
x_indices (list[int]) –
- Returns:
list of rescaled parameters
- Return type:
list[float]
- atomcloud.analysis.rescale_2d_params(params, indices, scales, theta_indices=None)[source]
Rescale fit parameters in a 2d function. Must scale along x, y and z additionally some parameters may not lie along the x or y axis and so need to be rescaled differently.
- Parameters:
params (list[float]) – list of function parameters
indices (list[list]) – list of lists of indices which are scaled by the corresponding scale in scales
scales (list) – list of scales to rescale parameters by
theta_indices (list | None) – list of index of the angle parameter corresponding to
tuple (each mixed axis) –
- Returns:
list of rescaled parameters
- Return type:
list[float]
- atomcloud.analysis.rescale_mixed_axis(params, mixed_inds, xscale, yscale, theta_indices=None)[source]
This rescales the major and minor axes which is not super simple if the x and y scale are different. However, is xscale and yscale are the same (i.e. pixel is square) then it’s pretty straight forward.
- Parameters:
params (list) – list of parameters
mixed_inds (list[tuple[int, int]]) – list of tuples of indices which are mixed axes
xscale (float) – scale to rescale x axis by
yscale (float) – scale to rescale y axis by
theta_indices (list[int] | None) – list of index of the angle parameter corresponding to each tuple
- Return type:
list[float]
Returns:
- atomcloud.analysis.rescale_parameters(params, indices, scale)[source]
Rescale the parameters in params at the indices by the scale.
- Parameters:
params (list[float]) – list of function parameters
indices (list[int]) – list of indices which are scaled by scale
scale (float) – scale to rescale parameters by
- Returns:
list of rescaled parameters
- Return type:
list[float]