Control PC and software¶
All measurements are done with the GUI laser_gui (AC-LGAD Laser Scan Control GUI) on the control PC. This page explains how to install the GUI, the initial settings on the device side, and how to start it.
Control PC¶
| Item | Details |
|---|---|
| User name and password | See Internal information (ask the contact person for the password) |
| GUI folders | ~/workspace/laser_gui/ (Japanese UI version), ~/workspace/laser_gui_en/ (English UI version) |
| Where to get the code | gui/laser_gui/ (Japanese UI) and gui/laser_gui_en/ (English UI) in this wiki's repository. See Installing the GUI from GitHub |
| Python | Latest version |
GUI versions¶
This wiki is written for the 2026-11-01 version.
On 2026-11-01 the GUI folders on the control PC were renamed from laser_gui_v4 / laser_gui_v4_en to laser_gui / laser_gui_en. Read laser_gui_v4 in older notes accordingly.
| Folder | Content |
|---|---|
laser_gui |
Japanese UI version |
laser_gui_en |
English UI version. In the 2026-11-01 version it was brought to the same specification as the Japanese version (same functions and defaults; only the on-screen text is in English). Use this version if you do not read Japanese |
Main revision history:
| Version | Main changes |
|---|---|
| 2026-11-01 | Made the laser standard conditions (1 MHz, TUNE manual 50 % = MIP-equivalent) the defaults and added the [โ Apply Standard Settings โ ] button to the laser panel. Brought the English version to the same specification as the Japanese version |
| 2026-10-16 (v4) | Support for pixel sensors (sensor type; pixel Find Origin, Full Calibration, scan range and analysis). The 2dYX template-fit analysis (paper figures) can be run from the [Analysis] tab |
| 2026-10 (v2) | Sensor dictionary, automatic origin registration, fine finishing + verification for Find Origin, 3 Z-tracking methods, method selection for TUNE optimization, etc. |
The screenshots in this wiki were generated automatically in simulation mode by docs/make_screenshots.py, which comes with the GUI (2026-11-01 version).
Waveforms and camera images are dummy data, and internal information such as addresses is blacked out.
Installing the GUI from GitHub¶
The GUI code is in gui/ of the same repository as this wiki. To install it on a PC other than the control PC, or to reinstall it on the control PC:
-
Get the repository and copy
gui/laser_gui_en(Japanese UI:gui/laser_gui) to~/workspace/. -
In the GUI folder, copy
config_local.example.jsontoconfig_local.jsonand replace the placeholders such as<SCOPE_IP>with the real values. The values are on the Internal information page (password protected).
The public code does not contain the IP addresses etc.
In the public repository, the device IP addresses, user names, etc. are replaced by placeholders such as <SCOPE_IP>, <STAGE_IP> and <SCOPE_USER>.
If you start the GUI without config_local.json, the terminal shows a "real device values are not set" warning and the oscilloscope and stage cannot be connected (simulation mode still works).
config_local.json is not tracked by git, so the real values are never committed.
Required software¶
On the Windows control PC (Python 3.10 or later), go to the GUI folder and install the dependencies (first time only).
Contents of requirements.txt:
| Package | Purpose |
|---|---|
| PySide6 | GUI framework |
| pyvisa, pyvisa-py | Oscilloscope control (when using VXI-11) |
| pyserial | PiLAS DX (USB virtual COM), SHRC-203 (when using RS-232C) |
| opencv-python | Focus camera |
| numpy | Numerics |
| paramiko | Data retrieval (scope โ PC, SSH/SFTP) |
| matplotlib, uproot | Quick analysis (figure output, .trc โ ROOT conversion) |
NI-VISA is not needed
The LeCroy VICP protocol is implemented in pure Python in devices/lecroy_scope.py,
so neither NI-VISA nor the LeCroy VICP passport is needed.
Initial device settings (first time only)¶
These settings are needed only when the setup is newly assembled or a device is replaced. For normal measurements they are already done.
- PiLAS DX: the USB connection requires the FTDI VCP driver (PiLAS Product Guide section 3.3). Check the COM number in Device Manager (COM5 on the control PC).
-
LeCroy oscilloscope: check the control method under Utilities โ Utilities Setup โ Remote on the scope.
- TCPIP (VICP) (default):
VICP::<scope IP>::INSTR - LXI (VXI11):
TCPIP0::<scope IP>::inst0::INSTR
Either way, the GUI falls back to the other one automatically on connect. The IP is in Internal information. 3. LeCroy SSH server: data retrieval connects to the OpenSSH server (sshd) on the scope's Windows. Already set up as of 2026-09. 4. SHRC-203: enable Ethernet in the controller menu and set the IP (Internal information). Use the SHOT-compatible command mode, and match the port number to the controller setting. 5. Control PC: set the IP address and gateway on the instrument LAN (Internal information). Set the subnet mask to 255.255.255.0. With 255.255.255.255, even devices on the same segment are not reached directly but via the router, and the stage (SHRC-203) does not respond. When you change the IP, mask or gateway on the SHRC-203 itself, they take effect after power-cycling it.
- TCPIP (VICP) (default):
Per-PC settings config_local.json¶
Settings that differ per PC, such as the COM port number or the save folder on the scope, go into
config_local.json in the same folder instead of editing config.py. Only the keys you write are overridden.
{
"laser_port": "COM5",
"stage_um_per_pulse": [2.0, 2.0, 2.0],
"stage_speed_pps": [1000, 10000, 200],
"scope_save_dir": "C:\\Users\\LeCroyUser\\Desktop\\data",
"scope_smb_user": "<SSH user>",
"transfer_dest_dir": "..\\data"
}
| Key | Default | Content |
|---|---|---|
scope_resource |
VICP::<scope IP>::INSTR |
Scope address |
scope_save_dir |
C:\Users\LeCroyUser\Desktop\data |
Base folder for waveforms on the scope |
scope_smb_user |
<SSH user> |
SSH user name for data retrieval |
transfer_dest_dir |
..\data |
Destination on the PC (may be relative to the GUI folder) |
stage_host / stage_port |
<stage IP> / <port> |
Stage address |
stage_um_per_pulse |
[2.0, 2.0, 2.0] |
Travel per pulse [ยตm] (X, Y, Z). Confirmed on the hardware |
stage_speed_pps |
[1000, 10000, 200] |
Start speed [pps], max speed [pps], acceleration time [ms]. Setting them too high risks losing steps |
laser_port |
COM5 |
Laser COM port |
camera_index |
0 |
Camera device index |
scope_trig_delay |
-53NS |
Standard horizontal offset |
laser_freq_hz |
1000000 |
Standard laser repetition rate (the value sent by [โ Apply Standard Settings โ ]) |
laser_tune_auto / laser_tune_percent |
false / 50.0 |
Standard TUNE (manual 50 % = MIP-equivalent) |
stage_screen_dir |
[1, -1] |
Jog direction: signs of the stage axes that move toward (right, up) in the camera image. Fix this if you change the camera or stage orientation |
Do not write the password in a file
The SSH password for data retrieval is not stored; enter it in the GUI for each transfer. Ask the setup administrator for the password.
Starting the GUI¶
The folder logs/ for logs and state files is relative to the directory you start from, so always start in the GUI folder.
On the control PC, open a terminal and start it as follows (the Japanese UI version is laser_gui).
cd workspace/laser_gui_en
python ./main.py # real hardware mode
python ./main.py --simulate # simulate all devices
On startup, the window opens sized to fit the usable area of the monitor. For the screen layout, see GUI overview.
Practicing in simulation mode¶
Starting with python main.py --simulate turns every device into a simulated one, and the window title shows [SIMULATION MODE].
- It has a simulated sensor response (
devices/sim_world.py) that reproduces zero signal on the electrodes, minimum amplitude at focus, a tilted sensor and TUNE dependence. - You can run origin finding, full calibration, Z focus, TUNE optimization and scans all the way through.
- State files are saved in
logs_sim/; the real-hardwarelogs/is not touched.
Practice in this order:
- Press [Connect] on each panel ([Start] for the camera).
- [Mechanical Home (H:W)] on the [Move] tab of the stage panel.
- [Go to Start] on the [Positions] tab.
- [Emission ON (ld=1)] on the laser panel.
- [Find Origin (ZโYโXโR:W)] on the [Alignment] tab.
- Run a 1D position scan on the auto scan panel.
We recommend going through the following Measurement overview once in simulation mode first.
Folder structure¶
The ~/workspace/ folder on the control PC looks like this:
workspace/
โโโ laser_gui/ # GUI (Japanese UI version)
โโโ laser_gui_en/ # GUI (English UI version)
โโโ data/ # waveforms retrieved from the scope (<year>/<YYYYMMDD>/scan_...)
โโโ macro/ # template-fit and pixel analysis (template_timing/)
โโโ results/ # analysis results (<scan name>/)
Inside a GUI folder (the English UI version has the same layout):
laser_gui/
โโโ main.py # entry point
โโโ config.py # settings (overridden by config_local.json)
โโโ sensors.py # registry of sensor / DUT profiles
โโโ scan_geometry.py # measured coordinates and tilt coefficients of the standard sensor (2026-08-24)
โโโ devices/ # device drivers (simulate mode built in)
โ โโโ pilas_laser.py # PiLAS DX
โ โโโ shrc203_stage.py # SHRC-203 + machine coordinate tracking
โ โโโ lecroy_scope.py # LeCroy (SCPI + VBS, screen capture)
โ โโโ scope_scp.py # data retrieval (SSH/SFTP)
โ โโโ focus_camera.py # USB camera
โ โโโ sim_world.py # simulated sensor response for --simulate
โโโ gui/ # PySide6 panels
โโโ logs/ # communication log, scan records, state files
โโโ captures/ # camera snapshots
โโโ analysis/ # quick analysis of acquired data (run_analysis.py)
The retrieved data (..\data), analysis results (..\results) and the template-fit analysis code (..\macro) on the PC are placed outside (next to) the GUI folder,
so that the Japanese and English GUIs can share the data. For details, see Output files.
Retrieved data are backed up to the NAS (Data retrieval and quick analysis).
Measurement log¶
Every command sent to a device and its response are shown in the communication log at the bottom left of the GUI, and are also kept in logs/gui_YYYYMMDD.log.
When something goes wrong, look at this file first.