pytweezer.analysis.analysis module

pytweezer.analysis.analysis.EllipticalGaussian2D(pos, amplitude, xo, yo, sigma_x, sigma_y, theta, offset)[source]
class pytweezer.analysis.analysis.TweezerExperimentAnalysis(year='26', month='01Jan', day='00')[source]

Bases: object

array_baseline_measurement(images, backgrounds, grid_shape=(8, 8), trap_size=3, detection_step=100)[source]
array_loading_threshold_measurement(zipNo, powers, datapoints, grid_positions, grid_shape, threshold, trap_size=3)[source]
clear_tweezer_images()[source]
extract_survival_probabilities(startZip, num_datapoints, grid_positions, grid_shape=(8, 8), trap_size=3, loading_threshold=6)[source]
getPos(startZipNo, endZipNo, bgZipNo, variable='TOF')[source]
getTemperature(startZipNo, endZipNo, bgZipNo, variable='TOF', show_images=False, incl_init_velocity=False)[source]
get_array_loading_probability_general(images, grid_positions, threshold=6.85, window_size=5, binning=20)[source]
get_array_loading_statistics(images, grid_positions, grid_shape, threshold=6.85, window_size=5, binning=20, show_histogram=True, threshold_detection=True, verbose=True)[source]
get_cloud_density(file_start, file_end, bg_fileno, parameter_name, crop, to_crop=False, show_images=True)[source]
get_cloud_size(startZipNo, endZipNo, bgZipNo, variable='TOF')[source]
get_cloud_size_den(startZipNo, endZipNo, bgZipNo, variable='TOF')[source]
get_cloud_width(startZipNo, endZipNo, bgZipNo, variable='TOF')[source]
get_fluorescence_atom_no(file_start, file_end, bg_fileno, parameter_name, crop, to_crop=False, show_images=True)[source]
get_next_zipno()[source]
get_temp_v_parameter(startZip, endZip, bgZip, no_zips_per_datapoint, parameter='tMolCool')[source]
get_tweezer_images()[source]
read_images_from_zip(zipNo, close=True)[source]
Parameters:

close (bool)

Return type:

ndarray

read_parameters_from_zip(zipNo, close=True)[source]
Parameters:

close (bool)

Return type:

dict[str, Any]

test_update()[source]
tweezer_inject(zipNo)[source]
tweezer_inject_double(zipNo)[source]
tweezer_show(images, reg=(25, 31, 22, 28), cmap='coolwarm', show=True, vmaxfactor=0.8, show_grid=True)[source]
tweezer_show_bg_subtracted(images, backgrounds, reg=(0, -1, 0, -1), cmap='gray', show=True, vmaxfactor=0.8, show_grid=True)[source]
pytweezer.analysis.analysis.atoi(text)[source]
pytweezer.analysis.analysis.cool_vco_to_detuning(vco)[source]
pytweezer.analysis.analysis.detect_bright_points(image_array, threshold=200)[source]
pytweezer.analysis.analysis.detect_loading_threshold(counts)[source]
pytweezer.analysis.analysis.detect_trap_sites(img_array, grid_shape, detection_step=100)[source]
pytweezer.analysis.analysis.detect_trap_sites_general(img_array, atom_number, detection_step=100)[source]
pytweezer.analysis.analysis.detuning_to_cool_vco(detuning)[source]
pytweezer.analysis.analysis.gaussian2D(pos, amplitude, xo, yo, sigma_x, sigma_y, offset)[source]
pytweezer.analysis.analysis.gaussian_high_pass(image, sigma_blur)[source]

Standard linear high-pass filter. Subtracts a Gaussian-blurred version of the image from itself.

pytweezer.analysis.analysis.maxwell_boltzmann_cdf(P, Amp, Pc, P_offset)[source]

Fits the loading probability curve assuming a thermal ensemble.

Parameters:
  • P – Tweezer Power (x-axis)

  • Amp – Saturation Amplitude (Max loading prob, e.g. ~0.55)

  • Pc – Characteristic Power (Proportional to Temperature)

  • P_offset – Shift in power (e.g. AOM turn-on threshold or background offset)

pytweezer.analysis.analysis.morphological_tophat_high_pass(image, feature_size)[source]

Non-linear high-pass filter (Recommended for Tweezer Arrays). Extracts bright features smaller than the feature_size.

pytweezer.analysis.analysis.natural_keys(text)[source]
pytweezer.analysis.analysis.sort_into_grid(centers, grid_shape=(2, 2))[source]
pytweezer.analysis.analysis.spot_sharpness(img)[source]
pytweezer.analysis.analysis.sum_pixel_values(image_array, grid_positions, grid_shape, window_size=10)[source]
pytweezer.analysis.analysis.sum_pixel_values_general(image_array, grid_positions, window_size=10)[source]
pytweezer.analysis.analysis.visualize_array_detection(image_array, grid_positions, margin=50, window_size=5, threshold=150, vmaxfactor=0.8)[source]
pytweezer.analysis.analysis.visualize_results(image_array, grid_positions, margin=50, window_size=5, threshold=150, vmaxfactor=0.8, index_labels=False, bin_sharpness=20, bin_thresh_factor=0.8)[source]