Constants

Physical constants and parameters of the experiments. These are mainly used in the ImageAnalysis.

class data_eng_utokyo.constants.CameraConstants(Cell_xsize: float, Cell_ysize: float, T_exp: float, magnification: float, eta: float, x_power: float, y_power: float, z_power: float, detuning: float, beam_diam: float, model: callable, pulse_per_coulomb: float, Gain: float, beta_cathode: float, Xmin: int, Xmax: int, Ymin: int, Ymax: int)[source]

Bases: object

Stores the constants of the setup related to the CMOS camera.

The class has custom getters for composite attributes, which are calculated from multiple attributes. This makes it possible to update attributes without introducing inconsistencies.

Parameters:
  • Cell_xsize (float)

  • Cell_ysize (float)

  • T_exp (float)

  • magnification (float)

  • eta (float)

  • x_power (float)

  • y_power (float)

  • z_power (float)

  • detuning (float)

  • beam_diam (float)

  • model (callable)

  • pulse_per_coulomb (float)

  • Gain (float)

  • beta_cathode (float)

  • Xmin (int)

  • Xmax (int)

  • Ymin (int)

  • Ymax (int)

hbar = 1.054571817e-34[source]
c = 299792458[source]
lambda_Rb = 7.8e-07[source]
omega0_Rb = 1883651567.3088531[source]
Gamma_Rb = 47752208.33456486[source]
I_sat = 3.5771[source]
property x_intens: float[source]

The x-axis light intensity [mW/cm^2].

property y_intens: float[source]

The y-axis light intensity [mW/cm^2].

property z_intens: float[source]

The z-axis light intensity [mW/cm^2].

property I_beam: float[source]

MOT Central light intensity.

property s_0: float[source]

Saturation parameter.

property Eff_Gamma_Rb[source]

Effective line width.

property Omega_VP[source]

Solid angle of viewport.

property two_D_gauss[source]
property Pow_elec_coef[source]

Power (W) → Signal (electron) conversion.

property MOTnum_Pow_coef[source]

MOT Atomic Number to Power (W) conversion.

property Elec_MOTnum_coef[source]

Signal (electron) to MOT number conversion.

property Pow_pulses_per_s_coef[source]

Conversion formula.

property MOTnum_pulses_per_s_coef[source]

Conversion formula.

property Xnum[source]

Width of the region of interest (ROI) in pixels.

property Ynum[source]

Height of the region of interest (ROI) in pixels.

data_eng_utokyo.constants.c_config(config)[source]

run = configuration_filename

# Load configuration with open(f”configuration/temperature/{run}.json”) as file:

config = json.load(file)

data_eng_utokyo.constants.two_D_gauss(X: tuple, A: float, sigma_x: float, sigma_y: float, mu_x: float, mu_y: float, C: float, Cell_xsize: float, Cell_ysize: float)[source]
Parameters:
  • X (tuple)

  • A (float)

  • sigma_x (float)

  • sigma_y (float)

  • mu_x (float)

  • mu_y (float)

  • C (float)

  • Cell_xsize (float)

  • Cell_ysize (float)

In the following, we demonstrate the use of the CameraConstants class with a simplified implementation.

import numpy as np

class Constants:

    def __init__(self, x_power: float, beam_diam: float):
        self.x_power = x_power
        self.beam_diam = beam_diam

    @property
    def x_intens(self) -> float:
        return self.x_power/(np.pi * ((self.beam_diam/2)**2))

Without the property decorator, the x_intens attribute would have to be set in the constructor. This has the problem, that updating the other attributes is not possible without causing inconsistencies between the attributes, as some attributes are calculated from the other. However, using the properties decorator, we can now easily do update like

from data_engineering_utokyo import Constants

c = Constants(x_power=100, beam_diam=1)

for x_power in range(100):
    c.x_power = x_power
    print(f"The derived value is x_intens = {c.x_intens}.")

We see that we can access the method x_intens() like an attribute and it always gives us the value based on the most up-to-date value of the other attributes. This is especially important when we want to vary parameters in an experiment.