pytweezer.drivers.motmaster module¶
Driver for a MOTMaster experiment sequencer.
MOTMaster is a .NET application reached over .NET remoting through pythonnet, so this module talks to it via clr rather than a Python instrument library. A MotMasterInterface is constructed with the name of a JSON config file in the package configuration/ dir naming the MOTMaster executable, its remoting URL, the .cs script root, and the DLLs to load; constructing one starts MOTMaster.exe if it isn’t already running and connects, so a constructed interface is a connected one.
- class pytweezer.drivers.motmaster.MotMasterInterface(config_file, interval=0.1)[source]¶
Bases:
object- auto_mot(scan_ranges, camera, shots_per_point=1, script='AMOTBasic', field_parameter='MOTCoilsCurrentValue', bg_field_value=0.0, mot_field_value=1.0, display_results=False)[source]¶
Tune the MOT by scanning wavemeter-lock set points laser by laser.
A background is taken first with the MOT coils at
bg_field_value, then each laser named inscan_rangesis stepped over its set points (coils atmot_field_value) whileshots_per_pointfluorescence frames are read offcamera. Background-subtracted counts pick the set point with the most atoms, and the laser is left parked there before moving on to the next one — so lasers are optimised in the orderscan_rangesgives.scan_rangesmaps laser name (a key of the config’slasersblock) to the slave frequencies to try, in THz.camerais a device name resolved withget_device(), or an already-connected camera (a client, or the object itself for a camera in this process); a client opened here is closed again on the way out. Configure the camera before calling — exposure, ROI, external trigger, and asetup_acquisitionbuffer holding at least the whole scan.auto_motarms it once and then reads consecutive frames, so the camera must capture exactlyshots_per_pointframes per MOTMaster shot.Returns, per laser, the scan range, mean and standard-error counts at each point, the chosen set point and the set point the laser started from; pass that dict to
plot_auto_mot_results()to see the scans.
- save_pattern_info(save_folder, file_tag, task_nr)[source]¶
Save pattern information to files. calls saveToFiles from MMDataIOHelper
- scan_microwave_amplitude(script, synthesizer='Gigatronics Synthesizer 2', values=(), move_yag_spot=False)[source]¶
- scan_microwave_frequency(script, synthesizer='Gigatronics Synthesizer 2', values=(), move_yag_spot=False)[source]¶
- scan_motmaster_parameter(script, parameter, values, move_yag_spot=False, callback=None)[source]¶
Run
scriptonce per entry invalues, with the MOTMaster parameterparameterset to that entry.callbackis called with the value after each shot and its return appended to the results.
- scan_picomotor_steps(script, motor, interval_steps, total_steps, speed=None, accel=None, callback=None, motmaster_parameter=None, motmaster_values=None)[source]¶
- scan_tcl_laser_set_points(script, laser, values, move_yag_spot=False, callback=None, motmaster_parameter=None, motmaster_value=None)[source]¶
- scan_wm_laser_set_points(script, laser, values, move_yag_spot=False, callback=None, motmaster_parameter=None, motmaster_value=None)[source]¶
- scan_wm_laser_set_points_with_motmaster_multiple_parameters(script, laser, values, move_yag_spot=False, callback=None, motmaster_parameters=None, motmaster_values=None)[source]¶
- pytweezer.drivers.motmaster.plot_auto_mot_results(results)[source]¶
Plot the scans returned by
MotMasterInterface.auto_mot(): one panel per laser, normalised number against detuning from the set point the laser started on, with an arrow marking the set point chosen. Returns the(figure, axes)pair.