atomcloud.functions.funcs_2d module

Created on Fri Mar 18 21:16:36 2022

@author: hofer

class atomcloud.functions.funcs_2d.EnhancedBose2D[source]

Bases: Gaussian2D

Enhanced Bose 2D cloud function object. This includes the fugacity in the fitting parameters. See FunctionBase for full documentation.

analyze_parameters(params)[source]

Analysis includes the integrated density and the sigma labwidths.

create_function(anp)[source]

Creates the 2D enhanced Bose fitting function. The polylog function which is just spence(1-z) for the 2D case is used (see jaxfuncs.spence.py). Also utilizes the gaussian2d function from the Gaussian2D class which is inherited.

default_bounds()[source]

Default bounds for the enhanced Bose function are the same as for the Gaussian except the fugacity is bounded between 0 and 1.

class atomcloud.functions.funcs_2d.FixedEnhancedBose2D[source]

Bases: Gaussian2D

Fixed enhanced Bose 2D cloud function object. We assume that for this fit function we are near quantum degeneracy and the fugacity is 1. See CloudFunctionBase for full documentation

analyze_parameters(params)[source]

Analysis includes the integrated density and the sigma labwidths.

create_function(anp)[source]

Creates the 2D fixed enhanced Bose fitting function see the non-fixed version for more details of the polylog function and gaussian2d function.

class atomcloud.functions.funcs_2d.FixedOffset2D[source]

Bases: FunctionBase

Fixed offset 2D cloud function object. This is a simple offset function which can be combined with those functions objects above.

create_function(anp)[source]

Creates the 2D fixed offset fitting function.

default_bounds()[source]

This can be absolutely anything between -inf and inf.

integrate_function(params)[source]

There is no analytic integration

rescale_parameters(params, scale)[source]

We only need to rescale the offset.

class atomcloud.functions.funcs_2d.Function2DBase[source]

Bases: FunctionBase

Inherits from FunctionBase and then adds the 2D specific function to create the coordinate transformation functions compatible with JAX.

See FunctionBase for full documentation

create_coord_funcs(anp)[source]

Creates the coordinate transformation functions which are compatible with JAX due to the use of the creation wrapper function. Again, we can’t use self in the function because it is not jittable

Parameters:

anp – The numpy or jax numpy module to use for the functions which are created.

Returns:

The overall coordinate transformation function for 2D coordinates

class atomcloud.functions.funcs_2d.Gaussian2D[source]

Bases: Function2DBase

See FunctionBase for full documentation.

analyze_parameters(params)[source]

Calculates the lab widths and the integrated density from the fitted parameters

create_function(anp)[source]

Creates the 2D gaussian fitting function

create_gaussian2d(anp)[source]

Creates the 2D gaussian function. This will be also used in the inherited ebose classes so it’s a separate function.

default_bounds()[source]

Returns the default bounds for the 2D Gaussian function

integrate_function(params)[source]

Integrates the 2D gaussian function analytically

rescale_analysis_params(analysis_params, scale)[source]

Rescales the analysis parameters from the func above

rescale_parameters(params, scales)[source]

Rescales the fitted parameters to the lab frame

class atomcloud.functions.funcs_2d.Parabola2D[source]

Bases: Function2DBase

Parabola 2D cloud function object. This is a simple parabola function and not for the integrated case, although it can be used as an approximation

analyze_parameters(params)[source]

Analysis includes the integrated density and the radius labwidths.

create_function(anp)[source]

Creates the 2D parabola fitting function.

create_parabola2d(anp)[source]

Creates the 2D parabola function. This is upside down and does not go lower than 0. Using the np.where or jnp.where which makes it JAX compatible. The parabola is also used for the Thomas-Fermi object which is why it is a separate function.

default_bounds()[source]

Default bounds for the 2D parabola function are the same as for the Gaussian.

integrate_function(params)[source]

Integrates the 2D parabola function. This is done analytically

rescale_analysis_params(analysis_params, scale)[source]

Rescales the analysis parameters for the 2D parabola function. This is the same as the 2d gaussian function.

rescale_parameters(params, scales)[source]

Rescales the parameters for the 2D parabola function. This is the same as the 2d gaussian function.

class atomcloud.functions.funcs_2d.ThomasFermi2D[source]

Bases: Parabola2D

Thomas-Fermi 2D cloud function object. This is a simple parabola but with a different exponent (3/2) since in absorption imaging we are integrating along the imaging beam axis.

create_function(anp)[source]

Creates the 2D Thomas-Fermi fitting function.

integrate_function(params)[source]

Integrates the 2D Thomas-Fermi function. This is done analytically

atomcloud.functions.funcs_2d.general_analysis_rescale(analysis_params, scale, key=None)[source]

General rescale for clouds which have only a single lab withds parameter and an integrated density.

atomcloud.functions.funcs_2d.general_lab_widths(px, py, theta, key='sig')[source]

Given two orthogonal parameters which are rotated by theta with respect to the x and y axes, this function returns the widths in the lab frame, but in a dictionary format.

atomcloud.functions.funcs_2d.general_rescale(params, scales)[source]
atomcloud.functions.funcs_2d.integrate_ebose(n0, sigma_x, sigma_y, fugacity)[source]

Integrates the ebose function analytically. However, currently the polylog value in the utils is a pretty good approximation. Need to make a general python polylog function that’s JAX compatible in the future.