This is a class for getting data of absorption imaging form three standard images (with atoms, without atoms, dark).
Properties
- self.path (unkown): path of the hdf5 file, produced by lyse moduel in LabScript.
- self.data_handle (class): handle of lyse.Run(self.path) in LabScript.
- self.camera_orientation (string): see the defination of absorption_imaging.__init__
- self.camera_label (string): see the defination of absorption_imaging.__init__
- self.image_atoms (2D numpy array): storing the data of the fist image.
- self.image_background (2D numpy array): similar to previous one
- self.image_dark (2D numpy array): similar to previous one
- self.image_absorption (2D numpy array): similar to previous one. (The OD number)
- self.detuning (float): laser beam detuning in Hz!!!
- self.intensity (float): laser beam intersity at atom cloud in (W/m^2)
- self.beam_energy (float): The laser beam energy shooting on the camera during exposure.
- self.atom_number (float): The number of atoms.
- self.transition (class): see the defination of absorption_imaging.__init__
- self.camera (class): see the defination of absorption_imaging.__init__
Functions
Functions | Usage |
---|---|
absorption_imaging.__init__ | Initialization of the class |
absorption_imaging.set_image_name | Set the name of images been read in hfd5 file |
absorption_imaging.get_image_absorption | Calculte the absorption imaging |
absorption_imaging.get_atom_number | Calculte the atom number accoring to the absorption imaging |
absorption_imaging.plot_result | Ploting the result |
absorption_imaging.get_beam_power | Calculate the laser pulse power shooting on camera |
absorption_imaging.__init__
dylab.absorption_imaging(data_path, camera_orientation, camera_label, transition=None, camera=None, detuning=None, intensity=None)
Initialization function of the absorption imaging class.
The path of those three standard pictures should be "camera_orientation\camera_label". The defult name of them are "atoms", "background" and "dark". If you would like to change their name for different configuration, plase use function absorption_imaging.set_image_name()
Just for get the absorption imaging, it doesn't require any information about camera and transition. But any further calculation, it has to call "transition" and "camera"
__enter__ and __exit__ functions is defined. But be careful, __enter__ function will calculate the atom number.
Parameters:
- data_path (unknown, necessary): The path of hdf5 file provided by lyse moduel in LabScript.
- camera_orientation (string, necessary): Name of the camare group in hdf5 file.
- camera_label (string, necessary): Name of the imaging group in hdf5 file.
- transition (objet of class dylab.TransitionClass.Transition, optional): A constant dictionary class storing the information of transition.
- camera (object of class dylab.Camera.*, optional): A constant dictionary class storing the information of camera.
- detuning (float, optional): Detuning of the laser beam.
- Intensity (float, optional): Laser beam intensity at the position of atom cloud!
absorption_imaging.set_image_name
dylab.absorption_imaging.set_image_name(image, name)
It can set the searching name of those three satandard images. The defualt names are "atoms", "background" and "dark".
Parameters:
- image (string, necessary): The contents of dictionary storing the name of those three images. It has to be one of "atoms", "background" and "dark".
- name (string, necessary): The new searching name.
Return
- Nothing
absorption_imaging.get_image_absorption
dylab.absorption_imaging.get_image_absorption()
It will calculate the absorption imaging and update the value storing in self.absorption_imaging, integrating in __enter__ function
Parameters:
- Nothing
Return:
- self.image_absorption (2D numpy array, optional): A two deminsional numpy array, which stores the calculation result. It will also update the value storing in self.image_absorption, so it not necessary to pick up the returned handle.
absorption_imaging.get_atom_number
dylab.absorption_imaging.absorption_imaging.get_atom_number(force_to_run=False)
It will return the value storing in self.aton_number. If there is no value, it will calculate the atom number and update the value storing in self.aton_number. It is also possible to force the program do the calculation and updating, even there is already an avaliable result.
Parameters:
- force_to_run (boolean, optionla): if it is true, the program will ingorn the value storing in self.aton_number, then redo the calculation.
Return:
- self.atom_number (float, optional): The number of atoms. It will also update the value storing in self.aton_number, so it not necessary to pick up the returned value.
absorption_imaging.plot_result
dylab.absorption_imaging.absorption_imaging.plot_result(vmin=None, vmax=None)
It can plot the results with jet colormap. Meanwhile, it is possible to change the colorbar range of the absorption imaging.
Parameters:
- vmin (float, optionla): The lower limitation of the colorbar range of the absorption imaging.
- vmax (float, optionla): The upper limitation of the colorbar range of the absorption imaging.
Return:
- Nothing (except a figure window)
absorption_imaging.get_beam_power
dylab.absorption_imaging.get_beam_power(laser_pulse_duration)
It can calculate the laser beam power shooting on the camera during exposure.
Parameters:
- laser_pulse_duration (float, necessary): The duration of laser pulse.
Return:
- self.beam_energy / laser_pulse_duration (float, necessary): It will return the calculation result and update the value in self.beam_energy