PICA: Advanced High-Precision Transport Measurement Automation with Python
Comprehensive Guide for Version 1.0.8
Note
v1.0.8 is now live! Novocontrol Alpha-AN C-V, calibration and temperature modules (experimental), a faster launcher and a smaller PyPI package (3.3 MB wheel, down from 9.9 MB). Install or upgrade via pip:
pip install --upgrade pica-suite
Table of Contents
1. Overview
High-precision, low-noise transport measurements are essential for advancing research in spintronics and materials characterization. To enable such progress, highly precise and accurate automation software is required. PICA (Python-based Instrument Control and Automation) is a modular, open-source software suite designed to automate advanced transport measurements for electronic devices and material samples. It runs on a standard Windows laboratory PC, and its installation, tests and windows are also verified on Linux.
It provides an extensible, unified graphical user interface (GUI) for orchestrating high-precision instruments, specifically current source (DC/AC) units, nanovoltmeters, high resistance electrometers, impedance analysers, and temperature controllers. Built on the robust Python scientific ecosystem, PICA leverages community standard libraries as an alternative to licensed commercial software for instrument control.
Using threading and multiprocessing, PICA drives these instruments together from one interface. It performs automated protocols, including temperature-dependent wide range resistance measurement (10-8 - 1016 Ω), current voltage (I-V) characterisation, capacitance characterisation, and pyroelectric current measurement. Temperature is controlled or logged through a Lakeshore 350/340 or Cryo-con 34, and measurements can run inside a cryostat such as a PPMS while it sets the magnetic field, without rewiring the setup between protocols.
2. Design Philosophy & Architecture
PICA was constructed on a core philosophy of robustness, modularity, and accessibility, prioritizing open standards over proprietary “black box” solutions.
2.1 The Choice of Python
Python was selected as the foundational language for PICA due to its ubiquity in the scientific community:
Scientific Ecosystem: Libraries like
NumPy(array operations),Pandas(data structuring), andMatplotlib(publication-quality plotting) create a seamless workflow from acquisition to analysis.PyVISA Integration: The
PyVISAlibrary provides platform-independent wrappers for VISA drivers, allowing communication via simple, readable commands (e.g.,instrument.query('*IDN?')) rather than complex low-level protocols.Portability: Python and PyVISA are available on Windows, Linux and macOS. PICA is validated with real instruments on Windows. On Linux, installation, tests and GUIs are verified, but measurements against real instruments are not yet (see Installing on Linux).
2.2 The Case for GUIs
While early automation scripts often rely on Command Line Interfaces (CLIs), the final PICA suite prioritizes full-featured GUIs built with Tkinter. This strategic decision was guided by:
Error Prevention: GUIs employ input validation and dropdown menus to restrict parameters to safe/logical ranges, preventing the “invalid command” errors common in CLI environments.
Real-Time Feedback: Embedded
Matplotlibplots provide immediate visualization of incoming data. This allows researchers to spot physical anomalies, noise, or connection issues instantly, potentially saving hours of wasted experimental time.Workflow Visualization: A visual interface helps new users and students mentally map the experimental workflow, reducing the learning curve.
2.3 Operational Transparency (No “Black Box”)
To foster trust and reproducibility, PICA rejects the opaque nature of proprietary software. Every measurement module has an Embedded Console Log:
Status Streaming: Displays a real-time stream of operations, such as “Ramping temperature to 300 K” or “Connecting to GPIB0::4::INSTR”.
Immediate Diagnostics: Instantly reports VISA timeouts or command errors, providing exact context for hardware failures rather than generic error codes.
2.4 Architecture: Process Isolation
The launcher starts every program in its own process with Python’s multiprocessing library.
Launcher: Lists the programs, scans the bus and shows instrument status.
Each measurement program: Runs in a separate process, with its own window, plots and instrument connections. If a measurement program hangs on a hardware timeout or crashes, the launcher and the other open programs keep running, and the hung program can be closed on its own.
2.5 Self-Contained and Modular Programs
In PICA, each program is designed to be self-contained. This architectural choice reduces dependency chains and mitigates the excessive abstraction layers that can make other projects difficult to understand or modify. Each program (i.e., each Python file or module) can operate independently, thereby facilitating debugging and maintenance.
This approach, however, leads to a considerable degree of code repetition because there are relatively few abstractions. Nevertheless, this trade-off can be advantageous in experimental environments, where the primary objectives are comprehensibility, maintainability, usability, and stability over extended periods, rather than strict adherence to principles of code elegance or minimal redundancy. In such contexts, scripts may remain functional without requiring updates for many years.
3. Installation & Setup
3.1 System Prerequisites
System Requirements & Compatibility
Platforms:
Windows 10 / 11 (x86_64): fully supported, and used daily in the lab with real instruments.
Linux: installation, tests and GUIs verified, but measurements against real instruments not yet verified. See Installing on Linux.
macOS: not tested.
Note
The 32-bit Novocontrol Alpha-AN frequency scan and the 32-bit GPIB scanner call Windows’ gpib-32.dll directly, so they run on Windows only.
Software Dependencies
Python 3.10+ (tested on 3.10 to 3.15; 3.15 is a pre-release).
Dependencies: installed automatically by
pip install pica-suite(NumPy, pandas, Matplotlib, PyVISA, PyVISA-py, PyMeasure, Pillow, psutil, zeroconf).
Warning
A VISA Backend is Required: PyVISA is a Python wrapper, not a driver. For PICA to communicate with hardware, you must install a VISA backend on your system first. If you attempt to run the software on a clean machine without a VISA implementation, it will fail to find the instruments. This is the most common failure point for new instrument control setups.
Choose one of the following:
NI-VISA: The industry standard from National Instruments. Download and install it from the NI website.
PyVISA-py: A backend written in pure Python. It can be used as a fallback but may have limitations compared to vendor-specific drivers like NI-VISA. For
pyvisa-pyto discover all resources and avoid warnings (e.g., for TCPIP or HiSLIP instruments),psutilandzeroconfmight be needed. These packages are already included in PICA’s dependencies (requirements.txt). Note that for direct GPIB communication viapyvisa-py, a separate GPIB library (e.g., from your GPIB adapter vendor) might still be required. PyVISA-py GitHub
Before proceeding, verify your VISA installation. For more details and troubleshooting, refer to the “Common Issues & Troubleshooting” section.
3.2 Getting Started
PICA is structured as a standard Python package. The steps below are for Windows, the platform PICA is validated on in the lab. For Linux, see Installing on Linux.
Option A: install from PyPI (recommended)
pip install pica-suite
To upgrade an existing installation, run pip install --upgrade pica-suite.
Option B: install from source
Clone the Repository
git clone https://github.com/prathameshnium/PICA-Python-Instrument-Control-and-Automation.git cd PICA-Python-Instrument-Control-and-Automation
Create Virtual Environment & Install
# Create and activate a virtual environment python -m venv venv venv\Scripts\activate # Install the package and its dependencies pip install .
To update PICA to the latest version, run the following command in the project directory:
pip install --upgrade .
If you are already in your virtual environment and want to force Python to reinstall the package (overwriting the old one), run this in your root project folder:
pip install --force-reinstall .
Note: Ensure you have the NI-VISA drivers installed on your host machine to allow
PyVISAto communicate with the hardware.
Installing on Linux
Warning
Talking to real instruments from Linux has not been verified yet. Installation, the full test suite and the GUI windows have been checked on Linux, but no measurement has yet been run against real hardware from a Linux machine. Lab use so far has been on Windows. If something does not work, please open a Linux issue with your distribution, your VISA backend and the instrument model.
What has been checked:
Check |
Ubuntu 24.04, CI on every push (full suite on Python 3.10, GUI smoke test on 3.13) |
Ubuntu 26.04, Python 3.14 (manual) |
|---|---|---|
|
Yes |
Yes |
Test suite (mocked instruments) |
Yes |
Yes |
Programs in the launcher, plus both launchers, open |
Yes, real Tk windows under xvfb ( |
Yes, same exception |
Measurement against real instruments |
No, not yet verified |
No, not yet verified |
1. Install the system packages. Tkinter and the emoji font are usually not part of a minimal install. Without the font, the icons on buttons show as empty boxes.
# Debian / Ubuntu
sudo apt install python3-venv python3-tk fonts-noto-color-emoji
# Fedora
sudo dnf install python3-tkinter google-noto-color-emoji-fonts
# Arch
sudo pacman -S tk noto-fonts-emoji
2. Create a virtual environment and install PICA.
python3 -m venv ~/pica-venv
source ~/pica-venv/bin/activate
pip install pica-suite
3. Set up a VISA backend. On Linux, PICA uses the pure-Python pyvisa-py backend, which pip install pica-suite installs for you. Each kind of connection needs one extra piece:
Connection |
What you need |
|---|---|
Ethernet (LAN / VXI-11 / raw socket) |
Nothing extra |
Serial (RS-232 / USB-serial adapter) |
Nothing extra ( |
USB (USB-TMC instruments) |
|
GPIB card |
The linux-gpib kernel driver for your card, then |
NI-VISA also exists for Linux, but only for a few distributions. See NI’s Linux support page.
To use serial ports, your user must be in the dialout group. Log out and back in after running this:
sudo usermod -aG dialout $USER
Check that the backend sees your instruments:
pyvisa-info
python -c "import pyvisa; print(pyvisa.ResourceManager('@py').list_resources())"
4. Run PICA. Start it the same way as on Windows (see Running the Software):
pica-gui
Differences from Windows:
Sleep during overnight runs. On Windows, the long unattended programs (the E4980A temperature, frequency and PPMS scans, the Alpha-AN temperature and temperature-step frequency scans, the Cryo-con 34 R-T modules and the pressure logger) stop the PC from sleeping during a run; other modules do not. On Linux none can, so block sleep yourself, for example by launching PICA through
systemd-inhibit:systemd-inhibit --what=idle:sleep --why="PICA measurement" pica-gui
Alert sounds. Most modules fall back to the system bell on Linux for the end-of-run and alarm beeps, and it may be muted. The three Keithley 2400 memristor modules beep only on Windows and are silent on Linux. The on-screen banners and logs still appear.
Different fonts. Linux draws the windows with its default fonts, usually DejaVu. The layout is the same, but the text is slightly wider.
Windows-only modules. The 32-bit Novocontrol Alpha-AN frequency scan and the 32-bit GPIB scanner call Windows’
gpib-32.dlldirectly, so they will not work on Linux. The 32-bit Alpha-AN scan does not open its window: it shows a “No GPIB driver” error and exits. The 32-bit GPIB scanner opens but reports that the driver is Windows-only. The regular Alpha-AN module goes through VISA and is not affected.
3.3 Running the Software
Graphical Launcher (Recommended) The central dashboard for accessing all modules, the plotter, and the scanner.
pica-gui
It opens on Advanced Options, the full card grid: every module PICA ships, grouped by measurement range and instrument, with the Instrument Status window beside it. Closing Advanced Options quits PICA. Each module can be launched directly from its card, and for developer convenience each card has a folder button in its top-right corner, a shortcut to the module’s Python scripts for rapid modifications. The Home button (house icon, top right of the window) brings up Quick Select, the guided route. From a source checkout,
python run_pica.pydoes the same aspica-gui. See Launcher v2.You can also run any of the individual GUI measurement modules independently. This is useful for quickly accessing a specific measurement without opening the main launcher. To do this, simply run the Python script for the desired module. For example:
python -m pica.keithley.k6517b.High_Resistance.IV_K6517B_GUI
Opening on Quick Select Quick Select is three dropdowns (category, module, protocol) that narrow a measurement down in plain language. It leaves some modules out (the Lakeshore 340 variants and most Cryo-con 34 ones, the temperature utilities, the bench multimeter, the pressure log, the function generator, the Keithley 2400 memristor modules and the diagnostic tools); Advanced Options lists them all. To open the launcher on Quick Select instead of Advanced Options:
python -m pica.main_v2
This works after
pip install pica-suite. From a source checkout,python run_pica_v2.pydoes the same. The classic launcher is outdated and kept as the legacy launcher page: View > Legacy Launcher (v1, outdated), orpython tools/legacy_stuff/run_pica_legacy.py.Command Line Interface (CLI) For headless operation, without the GUI.
pica-cli
Important
Template Scripts: The instrument control modules (CLIs) provided are designed as template scripts. Users are expected to edit these scripts to adapt them to their specific experimental requirements and custom workflows. They are also excellent for developing custom measurement protocols, sequences, and for learning instrument automation. These scripts are typically named with an ‘Instrument_Control’ suffix to denote their programmatic nature. This approach ensures maximum flexibility and customization for advanced research applications.
Note
Legacy CLI Notice: The PICA CLI (pica-cli) is retained to support legacy headless workflows. While fully functional for specific protocols, this interface is less frequently maintained and may not support recent features available in the GUI.
We strongly recommend new users utilize the PICA GUI for the most complete and supported experience.
3.4 Development Dependencies for Testing (Optional)
If you plan to contribute to PICA or run the test suite, you will need to install the development dependencies:
pip install -r requirements-dev.txt
Run the test suite (all instruments are mocked, so no hardware is needed):
python -B -m pytest -p no:cacheprovider
To see the coverage percentage as well:
python -B -m pytest --cov=pica --cov-report=term-missing -p no:cacheprovider
3.5 Try PICA Without Instruments
You can look around PICA without any instruments connected, on Windows or Linux. This walk-through takes about 15 minutes.
1. Install and open the launcher.
pip install pica-suite
pica-gui
The launcher opens on Advanced Options, which lists every measurement module grouped by instrument. The Home button (top right) brings up Quick Select, where you choose a measurement in three steps (category, module, protocol).
2. Open a measurement module. Click any module on a card, for example K2400 I-V. The module opens in its own window and shows its settings form, live plot area and console. Fill in the form to see what a run asks for. Starting a run needs a connected instrument, so stop at the form.
3. Look for instruments. Open the VISA/GPIB scanner from the launcher’s top-right toolbar. With nothing connected it finds no instruments; on a lab PC it lists every instrument on the bus.
4. Plot a real data file. Open the Plotter Utility from the same toolbar and add examples/Low_R_Test_10ohm_20251218_163101_IV.dat, an I-V sweep of a 10 Ω test resistor recorded with the Keithley 6221/2182A module. Choose Set Current (A) for X and Measured Voltage (V) or Resistance (Ohm) for Y. The Data File Format section explains the file layout.
5. Try the PID simulator. The temperature modules hold setpoints with a PID loop. The simulator shows how the PID settings change the approach to a setpoint on CCR and LN2 probes:
python -m pica.utils.PID_Simulator_GUI
6. Run the test suite. The tests drive the real module code against mocked instruments. They need a copy of the source:
git clone https://github.com/prathameshnium/PICA-Python-Instrument-Control-and-Automation.git
cd PICA-Python-Instrument-Control-and-Automation
pip install -e .
pip install -r requirements-dev.txt
python -B -m pytest -p no:cacheprovider
4. Safety Precautions
Warning
Safety Instructions: Always switch off the instrument and verify that the output current, voltage, and any other relevant parameters are set to zero before modifying the connections to the Device Under Test (DUT). Failure to follow appropriate safety procedures may result in electric shock or other hazards. Adopt a safety-first approach at all times, and ensure that all instrument parameters remain within the specified safe operating limits defined either by the instrument manufacturer or by your measurement setup.
5. Core Utilities
5.1 VISA Instrument Scanner
File Reference: pica/utils/GPIB_Instrument_Scanner_GUI.py
Reachable from the launcher’s toolbar and Tools menu and from the modules, this utility scans for connected hardware. It uses ResourceManager.list_resources() to find devices and sends a standard *IDN? query to verify communication. This allows users to verify their hardware configuration before starting any experiment. The VISA scanner also includes an address guide (a reference table kept in the script, which a lab can edit to match its rack).
The launcher (pica-gui) does not open it at startup: its own Instrument Status window already scans the bus, and a second process scanning at the same time is avoided. Advanced Options opened from Quick Select does open it about 1.5 s later, once the launcher’s own scan has finished (§5.5). The outdated classic launcher (python tools/legacy_stuff/run_pica_legacy.py) still opens it about half a second after startup. Checking the bus first is motivated by the fact that initiating a measurement without first verifying the instrument connection is highly likely to fail and may result in non-informative error messages, such as a VISA connection timeout.
The PICA Instrument Scanner utility, which automatically detects and identifies connected instruments.
5.2 PICA Plotter Utility
File Reference: pica/utils/PlotterUtil_GUI.py
A standalone, multiprocessing-enabled tool for detailed data analysis. Unlike the minimalist embedded plots in the measurement modules, this utility allows:
Comparative Analysis: Overlaying multiple
.csvor.datfiles.Live Updates: Monitoring active experiments by auto-refreshing data from disk.
Flexible Axis Control: Toggling linear/log scales to analyze data spanning orders of magnitude.
Comment lines: the number of comment lines at the top of a file is detected on load and shown in the Comment lines at top box; change it to re-read that file, or press Auto to go back to the detected count.
Any common encoding: UTF-8, files re-saved from Excel (UTF-8 with BOM, UTF-16) and Windows-native exports such as WinDETA’s (cp1252) load as they are.
The PICA Plotter Utility, a tool for data visualization and comparative analysis of multiple datasets including live plotting.
5.3 Embedded Document Viewer
To ensure the software is self-contained (useful for offline lab computers), PICA includes an in-app viewer for project documentation: this User Manual, the README, the Change Log and the License.
5.4 Measurement Module Interface
Each measurement module is a single window with two panels, the control panel on the left and the plot panel on the right, separated by a draggable divider. Upon launching a measurement module, it is recommended to first widen the control panel, as it is required for configuring all experimental parameters. Typical settings include specifying the sample file name, selecting the file storage location, choosing the instrument address via a selection box, and defining voltage and temperature step sizes, delays, and other experimental parameters.
The control panel also contains a console located below the parameter settings. This console can be scrolled and provides a continuous log of all operations executed by the software. The right-hand plot panel is a simplified plotting interface that can display one to four plots, depending on the specific module. The plots are updated in real time, and some modules allow switching the axes to a logarithmic scale to improve data visualization. The plotting interface is intentionally kept minimalistic, with limited functionality, to reduce unnecessary user interaction with the measurement setup and to keep the measurement program simple by omitting nonessential features.
At the right end of the header bar, at the top of the window, two icon buttons open the VISA Instrument Scanner (📟) and the PICA Plotter Utility (📈). Nearly every measurement module carries them (the Voltage Polling module has the scanner only), so rapid testing and diagnostics are one click away. The VISA/GPIB scanner allows the user to quickly verify whether instruments are properly connected and recognized by the system, while the plotter utility offers additional plotting capabilities beyond those available in the default plot window.
5.5 Launcher v2: Quick Select and Advanced Options
File Reference: pica/main_v2.py (run with pica-gui, or python run_pica.py from a source checkout, to open on Advanced Options; python -m pica.main_v2 or python run_pica_v2.py to open on Quick Select)
Launcher v2 is PICA’s launcher (pica-gui). It replaces the classic
launcher (pica/main.py), which is outdated and kept as the legacy launcher
page (View > Legacy Launcher (v1, outdated), or
python tools/legacy_stuff/run_pica_legacy.py). It exists because PICA has two kinds
of user who want opposite things from it: someone meeting the instrument rack
for the first time wants to be asked what they are measuring, and someone who
runs the rack every day wants every module on one screen. v2 gives each a
window of its own.
Quick Select (the main screen). Three dropdowns, answered in the order a person naturally thinks about a measurement:
Category — DC Resistance, AC Resistance, Impedance Spectroscopy or Pyroelectric.
Module — the resistance range or the measurement style. Under DC Resistance: Ultra Low Resistance (10 nΩ – 1 µΩ), Low Resistance (above 1 µΩ), Resistance, High Precision (1 µΩ – 100 MΩ), Normal Resistance (100 µΩ – 200 MΩ) and High Resistance (1 Ω – 10 PΩ). All of these ranges are approximate. Ultra Low and Low run the same delta-mode scripts; they are listed separately because a 10 nΩ contact and a 10 mΩ film are different measurements to the person making them, whatever the instrument pair.
Protocol — the individual measurement, e.g. an I–V sweep, an R vs. T where PICA drives the temperature, or an R vs. T where PICA only reads it.
Each choice also narrows the instrument list shown on the status strip, with each instrument’s own light: picking a category shows everything its modules can use, picking a module shows that module’s hardware, and picking a protocol shows only what that script talks to — an I–V sweep drops the temperature controller entirely, and a T Sensing (Cryocon 34) protocol drops the Lakeshore. “Do I have the hardware for this, and is it switched on?” is therefore answered where the choice is being made.
Each choice writes a short description of itself into the panel below, so all
three levels — what the measurement is, what range it covers, what the
protocol does — are on screen at once before anything is launched. The
descriptions name every instrument in full (“Keithley 2400”, not “K2400”),
since this screen is the one place in PICA that assumes no prior familiarity
with the rack. The protocol block ends with a You enter line listing the
fields that program’s form will ask for — the same list the hover card and
the Ctrl+F search show, from the same entry in pica/module_info.py.
The Cryo-con 34 appears in Quick Select under the LCR meter, the Alpha-AN, the electrometer and the two AC benches (lock-in and DMM), where its protocols sit next to the Lakeshore 350 ones. The delta-mode and Keithley 2400 modules are Lakeshore 350 only here; their Cryo-con twins still exist and are in Advanced Options.
Two shortcuts find any program.
Ctrl+Shift+Aopens Advanced Options: every module PICA ships, nothing filtered.Ctrl+Fopens Search: a fuzzy search over every program PICA can start, by name, instrument or input field. Both are described below.
Advanced Options (Ctrl+Shift+A, or the View menu). The complete card
grid: every module PICA ships, grouped by measurement range and instrument,
with the folder shortcut on each card. Nothing here is filtered or
range-limited — this is the expert route, and the one to use for the
temperature utilities, the bench multimeter, the
pressure log, the function generator and the memristor modules, which Quick
Select does not list. The window opens maximised and reflows its
cards into up to four columns, so a wide screen shows more of them before you
scroll; its bottom strip is the compact one, with the Instrument Status button
in place of the chips. A Home button (house icon, beside the scanner
and plotter icons in its top-right corner) brings the Quick Select window to
the front. pica-gui and python run_pica.py open the launcher as this
window alone: Quick Select stays hidden until Home brings it up, closing
Advanced Options quits PICA, and the standalone scanner is not opened.
Hover cards (Advanced Options). Rest the pointer on any module row for
about a second and a card opens beside it. It is headed by the program’s
full name, instruments first (Keithley 2400 + 2182 — R vs. T (T Control,
L350)), and has four lines: what the program
measures (the quantity, and whether the module drives the temperature or
only reads it), the instruments it opens, written out in full, the input
fields its form asks for (sample name, start and end temperature, ramp rate,
source current, compliance, VISA addresses and so on), and the script it
runs. A
note is added where one warning matters before launch — experimental, writes
no data file, needs a reference cable. Move the pointer away and the card
closes; click the row to launch. The text is kept in pica/module_info.py,
one entry per launchable program, so a new module is described by adding one
entry there.
Search (Ctrl+F, or View → Search Modules…). Press Ctrl+F in the main
window or in Advanced Options and a search box opens in the middle of that
window (from any other PICA window it opens over the main window). Type a few
letters and the matches appear under the box, best match first, each by its
full name — instruments first, so Keithley 2400 — I-V Sweep and Keithley
6517B — I-V Sweep are never confused — with the card of the highlighted
match beside the list. ↑ ↓ move through the list, Enter launches, Esc
or a click outside closes it and puts you back where you were; what you typed
is kept for the next Ctrl+F. Every program PICA can start is searchable:
all the measurement modules, the five diagnostic tools and every PICA Util.
The search is fuzzy and looks at everything: full names, categories,
instrument names, the Quick Select descriptions and the fields each program
asks for. So
k2400 rt finds the Keithley 2400 R vs. T modules, butterfly finds C-V,
cc34 or cryocon the Cryo-con editions, safety cutoff every module with
that field, and a misspelt resistence still finds the resistance modules.
The rack’s shorthand is understood (lcr, iv, rt, l340, lockin,
passive), and the PICA Utils — plotters, scanners, SCPI console,
calculators — are in the list as well.
Console. Everything the launcher does is logged, whether or not anything is showing it. Quick Select keeps it behind the Console button on the strip, which opens it in a window of its own; Advanced Options carries a three-line console inside its strip. A console opened after the fact still shows the lines written at startup, and every open view updates together.
View menu. Every window the launcher can show is in one place: Main
Window, Advanced Options (Ctrl+Shift+A), Search Modules (Ctrl+F) and
Console, followed by the two other ways into PICA, the text-menu PICA CLI
(opened in a terminal window) and the Legacy Launcher (v1, outdated),
the classic launcher (also python tools/legacy_stuff/run_pica_legacy.py).
PICA Utils (Ctrl+U, or Tools → PICA Utils…). Every standalone utility
in one window, grouped as Plotting, PPMS Utilities, Communication and
Calculators. A second Ctrl+U brings the open window forward; Esc closes it.
Quick Calc is a worksheet: each line is typeset as it is typed (fractions
stacked, powers raised, roots under a radical) with its value on the right, as
an exact fraction where it is one. A line can name a value (R = 4.7e3) or a
function (f(x) = x^2 + 1) for the lines below, and ans is the line above.
^ is a power; 2pi, 3(x+1) and I R multiply; RAD / DEG sets the
trigonometry.
Pressure gauge. The Pfeiffer TPG 361 address is set from the
Gauge Address Setup row on the Vacuum Gauge Logging card in Advanced
Options, or by searching for pressure. It is not in the Tools menu.
Help menu. User Manual, README, Change Log and License open in a viewer inside the launcher (with Open on GitHub as a fallback). About PICA lists the PICA release, launcher version and environment as selectable text with a Copy Info button for bug reports; Cite PICA gives the citation in APA and BibTeX form, and the DOI, each with its own Copy button.
Status strip. Both windows carry a band along their bottom edge. On Quick Select it holds the temperature snapshot, a pressure tile (reading “no gauge configured” until a Pfeiffer TPG 361 address has been set; after that it shows the pressure from each scan), the instruments the current choice needs (each with its light), and the Console, Reload and Instrument Status buttons. The status button reads, for example, Instrument Status 3/10 on the bus. Advanced Options uses a compact strip with the readings, a three-line console and the Instrument Status button, but no chips.
Instrument Status window. It opens by itself a moment after the launcher starts, and fills in when the first scan lands (so it still appears, and still explains itself, when PyVISA is missing or the VISA backend errors). After that it is opened from the strip button — launching a measurement does not raise it, which would only bury the module you just asked for. A launch from Quick Select or Search repaints the bottom panel of every open window; it does not rescan, because a module that has just started is opening its own connections and the launcher must stay off the bus. Press Reload for a deliberate rescan. The window is the launcher’s own VISA scanner:
every known instrument as a chip with its light. The dot key reads ● on (green, blinking: on the bus and answering), ● off (grey: not found on the last scan). The Novocontrol Alpha-AN and the Keysight E4991B are probed like every other instrument (one
*IDN?per scan). An address hand-listed inpica/launcher_protected_gpib.jsonis never opened; older launchers wrote the Alpha’s address there automatically, so delete that entry on a PC where the Alpha still shows as skipped.an instrument that answers but matches nothing in the reference table gets a chip of its own, named from its
*IDN?reply and marked (new) — so a newly racked instrument shows up without anyone editing PICA first.the instruments the current Quick Select choice needs are marked with an accent bar.
below the chips, the VISA / GPIB scan table: every resource, what it was identified as, the raw reply and how long it took to answer. It is filled from the pass that lit the dots — no address is opened twice to build it — one row at a time as each address answers, so a slow scan shows where the time goes.
Secondary addresses: Show | Hide. The Lakeshore 340 and 350 answer on all 31 GPIB secondary addresses of their own (
GPIB0::12::5::INSTR…). Hide skips them; it applies from the next Reload, so switching it never puts anything on the bus by itself. Show is the default.Full VISA / GPIB Scanner opens the standalone scanner utility (§5.1), unchanged, for its address guide (the SCPI Console, in the Tools menu, is the place to send commands by hand). It is not opened at startup, because it repeats, in a second process and a second pass over the bus, what this window already shows. When Advanced Options is opened from Quick Select it does open about 1.5 s later (waiting for the launcher’s own scan to finish), but not when
pica-guiorrun_pica.pystart in Advanced Options. It is in the Tools menu and on the toolbar.
Important
The strip is filled by a single read-only scan at startup, and again only when Reload is pressed. The launcher never polls in the background, so once a measurement is running it stays off the GPIB bus. Pressing Reload while any measurement started from the launcher is still running raises a confirmation first.
5.6 Diagnostic Tools
The launcher’s Tools menu holds read-only checks for when an instrument does not show up. None of them sends a set command to an instrument.
Python Environment Check: installed packages and whether Python is 32- or 64-bit.
System and Drivers: NI-488.2, VISA and the DLLs PICA relies on.
Communication Interfaces: the GPIB, USB, serial and LAN interfaces this PC has.
Connected Devices and Drivers (new in v1.0.8): one step further down, for “I plugged it in and nothing sees it”. For every USB, COM and LAN device it asks Windows whether the device is connected, has a driver, and whether that driver is running, with the Windows error code if not. It also lists each COM port with the device that owns it, the third-party driver packages installed (FTDI, NI, Keysight, Prolific, …) and the LAN neighbours Windows knows about. Press Run Check again after plugging something in to see exactly which devices appeared or disappeared.
Cryocon 34 Diagnostics and Novocontrol Alpha-AN Diagnostics: query-only surveys of those two instruments.
6. Supported Measurement Modules
The system is currently validated with industry-standard hardware, covering a resistance range spanning 24 orders of magnitude, pyroelectric current measurements with 10-15 A resolution, and capacitance characterisation from 20 Hz - 2 MHz.
Module |
Configuration / Instrument |
Use Case |
Range |
|---|---|---|---|
Ultra Low Resistance Measurements |
Keithley 6221 + K2182 + Lakeshore 350/340 |
Superconductors & metallic films; cancels thermal EMFs by current reversal (Keithley Delta mode). |
10 nΩ - 100 MΩ |
Mid-Resistance (Standard) |
Keithley 2400 SourceMeter + Lakeshore 350/340 |
Semiconductors, oxides, general transport. |
100 µΩ - 200 MΩ |
Mid-Resistance (High-Precision) |
Keithley 2400 + K2182 + Lakeshore 350/340 |
Detecting subtle phase transitions. |
1 µΩ - 100 MΩ |
High-Resistance |
Keithley 6517B Electrometer + Lakeshore 350/340 |
High bandgap materials, polymers, & ceramics. |
1 Ω - 10 PΩ |
Capacitance Analysis |
Keysight E4980A + Lakeshore 350/340 |
C-V Analysis and Magnetocapacitance characterization. |
20 Hz - 2 MHz |
Broadband Dielectric |
Novocontrol Alpha-AN + ZG4 |
Permittivity, electric modulus & AC conductivity (WinDETA-compatible). Experimental. |
20 Hz - 10 MHz |
Memristor switching |
Keithley 2400 |
Switching I-V, retention and endurance of resistive-switching devices. |
±200 V source, hardware never-exceed voltage and current compliance set per run |
Pyroelectric |
K6517B + Lakeshore 350/340 |
Current vs Temp (detecting Curie temperature). |
10-15 A Resolution |
While the current implementation drives specific instruments, the underlying framework is highly customizable. Researchers need only replace specific SCPI commands to utilize the suite with different models.
PICA is designed to be versatile while being optimized for specific classes of instruments. The following modules represent the core capabilities of the suite, supporting a resistance scale spanning 24 orders of magnitude (10 nΩ to 10 PΩ) depending on the hardware used. Pyroelectric measurement performed using an electrometer enables highly sensitive characterization of ferroelectric phase transitions by detecting extremely small pyroelectric currents, with a resolution on the order of 10-15 A. The impedance analyzer enables the characterization of capacitance anomalies over the frequency range from 20 Hz to 2 MHz and is utilized for magnetocapacitance and photoinduced characterization across a wide variety of multiferroic systems.
6.1 Ultra Low Resistance Measurements
Target Hardware: Keithley 6221 (Current Source) + K2182 (Nanovoltmeter). Typical Range: 10 nΩ to 100 MΩ.
Scientific Objective: Ideal for superconductors, metallic films, and low-impedance devices. It actively cancels thermal offsets (Seebeck EMFs) generated in leads and contacts.
Principle: Uses the Keithley Delta mode (current reversal).
Note
Understanding “Delta Mode”: The term “Delta Mode” refers specifically to a technique used by Keithley Models 6220 and 6221 Current Sources in conjunction with the Model 2182/2182A Nanovoltmeter for very low resistance measurements. This method is described in detail in the Keithley Low Level Measurements Handbook. In this documentation, “Ultra Low Resistance Measurements” is used as the general scientific term, while “Delta Mode” may appear when specifically referencing the Keithley-specific method or program files.
Source +I, measure V1.
Source -I, measure V2.
Compute V_corr = (V1 - V2) / 2.
The 6221 runs the sequence itself: it talks to the 2182 over an RS-232 cable and synchronises each reading through a Trigger Link cable. Both cables are needed.
I-V sweep measurement using the Sweep Mode, designed for low-resistance measurements with a Keithley 6221 and 2182. Sweep types: linear or logarithmic Start to Stop, or a Custom List of currents (µA) pasted from the List Maker; the 105 mA source limit is checked before the instruments are touched.
Ultra Low Resistance Measurement R-T measurement with active temperature control, using a Keithley 6221, K2182, and a temperature controller.
Ultra Low Resistance Measurement R-T measurement in sensing mode, where the system logs resistance and temperature while an external system manages temperature.
6.2 General Transport (Standard I-V & R-T)
Target Hardware: Keithley 2400 SourceMeter (SMU). Typical Range: 100 µΩ to 200 MΩ.
Scientific Objective: General transport characterization for semiconductors, oxides, and devices.
Capabilities:
I-V Sweep: Linear sweeps, hysteresis loops, or custom current lists.
R-T Active Control: Applies constant DC current while coordinating with a temperature controller (e.g., Lake Shore 350) to ramp temperature.
A standard I-V sweep performed with a Keithley 2400 SourceMeter, suitable for general-purpose device and sample characterization.
Resistance-Temperature (R-T) measurement with active temperature control, using a Keithley 2400 and a Lakeshore 350 controller.
Resistance-Temperature (R-T) measurement in sensing mode, where the system logs resistance and temperature while an external system/controller manages temperature.
6.3 High Precision Transport (mid resistance range)
Target Hardware: Keithley 2400 (Source) + K2182 (Nanovoltmeter). Typical Range: 1 µΩ to 100 MΩ.
Scientific Objective: Detects subtle phase transitions in semiconductors and oxides where standard SMU resolution is insufficient.
Advantage: Combines the stable sourcing of the SMU with the nanovolt-level sensitivity of a dedicated voltmeter, utilizing a true 4-wire configuration to eliminate lead resistance errors.
High-precision I-V characterization using a Keithley 2400 as a current source and a Keithley 2182 nanovoltmeter for sensitive mid-range resistance measurements.
High-precision R-T measurement with active temperature control, combining the K2400, K2182, and a L350 temperature controller.
High-precision R-T measurement in sensing mode, leveraging the K2400 and K2182 for enhanced accuracy for mid-range resistance measurements.
6.4 Electrometry & High Resistance
Target Hardware: Keithley 6517B Electrometer. Typical Range: 1 Ω to 10 PΩ (1016 Ω).
Scientific Objective: Characterization of insulators, polymers, and ceramics (Electrometry).
Principle (Voltage Driven): Applies a high voltage and measures the resulting leakage current (pA/fA range).
Note: PICA manages instrument settling times, allowing for a necessary initial delay for the system to stabilize. This is crucial in high-impedance setups to ensure steady-state ohmic currents are accurately recorded.
A screencast demonstrating the high resistance IV module is available at this link.
High-resistance I-V measurement performed with a Keithley 6517B Electrometer, designed for characterizing insulating materials.
High-resistance R-T measurement with active temperature control using a Keithley 6517B.
High-resistance R-T measurement in passive sensing mode using a Keithley 6517B.
6.5 Pyroelectric Current Measurements
Target Hardware: Keithley 6517B Electrometer + Temperature Controller. Sensitivity: Down to 1 fA (10-15 A).
This module automates the measurement of pyroelectric currents (Ip) as a function of temperature, commonly used to characterize ferroelectric phase transitions and identify Curie Temperatures (Tc).
Workflow:
Poling (Optional): Apply bias field while cooling.
Heating: Remove bias; heat sample at a linear rate.
Measurement: Record the depolarization current peak indicative of phase transition.
Best Practice: For measurements in the fA range, ensure your setup utilises proper shielding (e.g., double-layer Faraday cage).
Pyroelectric current measurement as a function of temperature, captured with a Keithley 6517B to identify ferroelectric phase transitions via measuring pyroelectric current.
6.6 High Voltage Poling
Target Hardware: Keithley 6517B (Voltage Source). Capabilities: High Voltage Sourcing.
This utility provides a dedicated interface for In-situ and ex-situ electrical poling of materials.
Objective: Establish a uniform ferroelectric polarization state in samples before characterization.
Applications: Preparing samples for pyroelectric current measurements, converse magnetoelectric studies, and ex-situ neutron diffraction studies on poled materials.
6.7 Dielectric Spectroscopy
Target Hardware: Keysight E4980A Precision LCR Meter. Frequency Range: 20 Hz to 2 MHz. Temperature Range: set by the cryostat (validated 5 K – 380 K in a PPMS).
Scientific Objective: Measures Capacitance (C) and Loss Tangent (tan delta) as a function of frequency or DC bias voltage (C-V Analysis).
Capacitance-Voltage (C-V) characterization of a device or a sample using a Keysight E4980A LCR meter.
Note
C-V module v2.0 (October 2026). Every C-V file is self-describing: the # header records the instrument identity and options, the sweep (mode, loop shape, step, cycles, hold and ramp settings, the hard 20 V cap), the frequency order with “file k of N”, the LCR settings read back from the instrument, and one waveform: line in words. Each row carries t_s, a Timestamp, Cycle, Segment, the four monitors (Vdc_mon, Idc_mon, Vac_mon, Iac_mon), the raw R_raw, X_raw and Status, after the legacy columns. The 18 derived columns are NaN when the status is -1 or 1. The file ends with # END reason=.... Loop shapes: positive first, negative first, unipolar +/-, and a ladder (one bipolar cycle per listed amplitude, as in the memristor sweep module; the Cycle column is the ladder entry number). Frequencies are measured in the order typed. Bus errors are retried forever (1, 2, 5, 10, 30, 60 s, then every 60 s) with RETRY and RECONNECT lines in <sample>_<ts>_CV_log.txt; nothing modal appears during or after a run. The DC bias is a voltage source with no current compliance; Idc_mon(A) is the DC current through the sample. The plain script CV_KE4980A_Simple_Instrument_Control.py runs the same path without a window.
6.8 Broadband Dielectric Spectroscopy
Target Hardware: Novocontrol Alpha-AN Impedance Analyzer with a ZG4 sample interface, over GPIB through VISA. Status: experimental.
Frequency Range: choose one of three fixed series, 115 points from 20 Hz to 1 MHz (default), 40 points from 20 Hz to 10 MHz, or the E4980A list (377 points, 40 Hz to 2 MHz), or Custom list to type your own.
Other Alpha-AN modules (experimental): C-V, calibration (REF, load-short, open), temperature-step frequency scan (Lakeshore 350 / 340; same frequency list box, E4980A list by default), and dielectric temperature scans with T control (Lakeshore 350 / 340) or T sensing (Lakeshore 350 / 340, Cryo-con 34). All are under Novocontrol Alpha-AN in the launcher.
Editions: the regular module goes through VISA and is labelled 64-bit (VISA); its twin for PCs with only a 32-bit gpib-32.dll is labelled 32-bit (NI-488.2 GPIB). The label is in the window title and header.
Scientific Objective: Measures the complex permittivity (ε’, ε’’), electric modulus (M’, M’’) and AC conductivity (σ’, σ’’) of a dielectric sample at fixed temperature. Output is written in a WinDETA-compatible format so it opens directly in Novocontrol’s WinFIT analysis tool, alongside a PICA
.datfor the built-in Plotter.Custom Frequency List: pick Custom list and type frequencies in Hz separated by commas (spaces, semicolons and new lines also work), e.g.
20, 100, 1e3, 1e4, 1e5. Points run in the order typed. A line under the box shows the point count and span, or why the list would be refused: every value must be within the Alpha-AN range of 3e-5 Hz to 20 MHz, at most 1000 points. The List Maker button next to the box opens the List Maker utility to build a list; paste its output into the box. The box and button are greyed out while a preset is selected.Reference Calibration: Use the dedicated Run REF Calibration button before a measurement session. It must run with the sample disconnected from the ZG4. Before anything is sent, the GUI explains what the calibration does and what to disconnect; OK starts it, Cancel sends nothing. Calibration data is stored inside the mainframe and survives resets, so a sweep runs on the most recent calibration; the GUI logs the calibration’s age but never blocks on it.
Note
The module never applies DC bias and never transmits a bias command (the analyzer does have DC bias; its maximum is not yet confirmed). A stale reference calibration shows up as a step or kink in ε’(f) at a reference-capacitor switch boundary rather than as uniform noise; re-run the REF calibration if you see one.
6.9 Standalone Temperature Utilities
Target Hardware: Lake Shore 350 and 340 Temperature Controllers, Cryo-con 34 (experimental).
PICA also includes standalone utilities for monitoring and controlling temperature, independent of other measurement modules.
Temperature Monitor: A simple interface for logging temperature from multiple types of sensors.
Temperature Control: A dedicated module for setting temperature ramps, controlling heater outputs, and managing control loops.
Step-wise Control (Basic): A step-sequence controller that ramps to each setpoint, waits for stabilization, and hands off to an external measurement.
Step-wise Control (Advanced) (new in v1.0.6): A self-contained advanced version of the step-sequence controller. It adds an adaptive ramp rate (computed per step and hard-capped by an editable low-temperature rate table, taming overshoot on LN2-dewar probes below 100 K), an optional approach-from-one-side mode for hysteresis-sensitive measurements, configurable stability criteria (tolerance band, rolling window, drift limit, timeout), and per-setpoint summary logging alongside safety features such as a hard kill-switch temperature and a soft Max-Temp limit with graceful abort.
Lakeshore 340 versions (v1.0.6, experimental): sensing, direct control, range control and step control (standard and advanced) in
pica/lakeshore/, as separate*_L340_*programs.Cryo-con 34 (v1.0.6, experimental): temperature sensing, direct control and a read-only diagnostic console in
pica/cryocon/.Sensor curve tools (v1.0.6): loaders that write a sensor calibration curve into the Lakeshore 340/350 or the Cryo-con 34, and viewers that read back the curves a controller holds.
The standalone Temperature Monitor utility, used for logging data from a Lakeshore 350 controller.
The standalone Temperature Control utility, providing a dedicated interface for managing temperature ramps and heater outputs on a Lakeshore 350.
6.10 Bench Multimeter Logging (Keithley 197A)
Target Hardware: Keithley 197A Autoranging Microvolt DMM.
A single-instrument logger for the Keithley 197A. It sets the measurement
function and range, then polls the meter and records the reading against time
with a live plot, until stopped. All seven functions are exposed (DC volts,
AC volts, 2-wire ohms, 4-wire ohms, DC amps, AC amps and dB), with autorange
as the default. The module ships in the usual two forms, a Tkinter GUI
(Monitor_K197A_GUI.py) and a headless twin
(Monitor_K197A_Instrument_Control.py).
Two things set this module apart from every other one in PICA, and both matter before you use it:
The interface card is required. The 197A has no built-in IEEE-488 bus. Remote control is only possible with an add-on Model 1973A (or 1972A) interface fitted to the meter. Those cards speak IEEE-488-1978, which predates both IEEE 488.2 and SCPI, so there is no
*IDN?identify query and no colon-prefixed command anywhere in this module. If nothing answers at the configured address, the module reports a plain diagnosis naming the missing card rather than raising an error, and points you at the GPIB Scanner utility.The command table is UNVERIFIED. The single-letter device-dependent commands (
Ffor function,Rfor range,Xto execute) are collected in one dictionary at the top of each file, marked as unverified. They have not been confirmed against hardware or against a machine-readable manual; the authoritative source is the printed Model 1973/1972 IEEE-488 Interface Instruction Manual. Correct that one dictionary from the manual before trusting any reading. Use the SCPI Console utility if you need to try command strings against the meter by hand. Every data file written by the module carries the line# Command table verified against manual: NOin its header as a reminder.
The reply format is likewise undocumented to us, so readings are parsed defensively: the first floating point number in the reply is taken as the value, and both the parsed value and the full raw string are written to the data file. A reply with no number in it is logged and written with a blank value rather than stopping the run. Units come from the selected function, not from the reply.
The poll interval is a GUI field defaulting to 1.0 s, with a hard floor of 0.34 s because the meter’s own maximum is 3 readings per second. Anything faster is clamped, and the clamp is announced in the console.
The default VISA address is the placeholder GPIB0::7::INSTR. It is editable
in the GUI, and it is very likely wrong on your rack; run the GPIB Scanner
utility to find the real one.
6.11 AC Transport (Keithley 6221 AC Current Source)
Target Hardware: Keithley 6221 AC/DC current source, paired either with an SRS SR830 DSP lock-in amplifier or with a Keithley 197A bench DMM. Optional thermometry from a Lakeshore 350, a Lakeshore 340 or a Cryo-con 34.
Fourteen modules in two matched sets of seven. Each set covers the same four-probe AC measurement in the same four situations, so a measurement can be moved between the two detectors without changing anything else:
Protocol |
6221 + SR830 |
6221 + 197A |
|---|---|---|
AC I-V (current sweep, fixed f) |
|
|
AC frequency scan (fixed I) |
|
|
R–T, this module drives the ramp |
|
|
R–T, passive (Lakeshore 350) |
|
|
R–T, this module drives the ramp (Lakeshore 340) |
|
|
R–T, passive (Lakeshore 340) |
|
|
R–T, passive (Cryo-con 34) |
|
|
The SR830 set lives in pica/lockin/sr830/, beside the existing
AC_Resistivity_K6221_SR830_GUI.py; the 197A set lives in
pica/keithley/k6221_k197a/.
The current is set, not measured. The 6221 is a true current source, so
in both sets the current through the sample comes from the setting.
SOUR:WAVE:AMPL is a peak amplitude while every voltage here is RMS, so
the conversion happens once, explicitly:
I_rms = I_peak / sqrt(2)
Dividing an RMS voltage by a peak current gives a resistance wrong by exactly
sqrt(2) = 1.414 — large enough to matter, small enough to look plausible.
That factor is pinned by the test suite in the ten Lakeshore 350 and Cryo-con modules.
With the SR830 (phase sensitive). R = X / I_rms, the in-phase
and therefore resistive part; the magnitude sqrt(X^2 + Y^2) / I_rms
is logged beside it, and the two agreeing to a fraction of a percent is the
evidence that the phasing is right and the contact is ohmic. The lock-in needs
a reference and the 6221 supplies it as a 1 µs TTL phase-marker pulse:
6221 TRIGGER LINK line 3 → SR830 REF IN. This cable is not optional. Without it the SR830 free-runs and every number it returns is meaningless.
Each point reads LIAS? and compares the SR830’s FREQ? against the
frequency programmed into the 6221, so a missing reference cable is reported
as an error and written into the file’s Flags column rather than logged as a
plausible resistance. Overloads and a reading above 90 % of the sensitivity
full scale are flagged the same way.
With the 197A (magnitude only). R = V_rms / I_rms.
The 197A on AC volts is a broadband true-RMS converter with no reference
input: there is no X, no Y and no phase. Nothing outside the drive
frequency is rejected, so mains hum, thermal EMF at the wrong phase, amplifier
noise and the harmonics of a non-ohmic contact all add in quadrature and
always upward — V_measured = sqrt(V_signal^2 + V_noise^2) >= V_signal —
which makes the reported resistance an upper bound. Use this pairing
when the voltage is comfortably above the meter’s noise floor and no lock-in
is free; use the SR830 pairing for anything small. Three consequences are
visible in the module:
the spread across the averaged readings is logged next to the mean, because with no reference it is the only noise estimate there is;
a drive outside the meter’s AC volts band is flagged on every point, since outside it the meter simply rolls the signal off and the resistance is low by an unknown factor;
everything in §6.10 about the 197A still applies — the Model 1973A/1972A interface card is required, and the command table is UNVERIFIED against the printed interface manual.
Temperature. The T-Control modules stabilise at the start temperature, arm
SETP and RAMP on the Lakeshore 350 or 340, open the heater and log along the
ramp, with a safety cutoff beyond the end temperature. The heater is put back
to off when the run ends, is stopped, or throws — in the same thread that
opened it, on every exit path, exactly as the current is. The T-Sensing
modules never write to their thermometer at all: whatever is driving the
temperature keeps driving it. The Cryo-con variants verify that the chosen
channel is displaying Kelvin before the run starts, parse the Cryo-con status
strings (-------, .......) rather than handing them to float(), and
retry the first *IDN? of a session.
Every module writes the standard PICA commented-header .dat file (§9.4),
with optional bar or van der Pauw resistivity and sheet resistance columns,
and takes the 6221 output off on every exit path.
Status: experimental. The pairings work and the conversions are tested, but neither set has been through a full measurement campaign.
6.12 Memristor Switching (Keithley 2400)
Target Hardware: Keithley 2400 SourceMeter, sourcing voltage with a current compliance. New in v1.0.7.
Three measurement programs in pica/keithley/k2400/ and one analysis utility:
Switching I-V sweep (
Memristor_Sweep_K2400_GUI.py): voltage loops with a separate maximum voltage and current compliance for the positive and negative sides. Loop shapes: bipolar (positive or negative side first), unipolar + or −, and a ladder that runs one bipolar loop per listed amplitude. An optional pause can be set between loops.Retention (
Memristor_Retention_K2400_GUI.py): writes one state (SET for the low-resistance state, RESET for the high-resistance state, or nothing for a control run), then reads the resistance against time since the write. Master mode runs control, LRS and HRS one after another on one connection, with a rest at 0 V between them.Endurance (
Memristor_Endurance_K2400_GUI.py): SET, read, RESET, read, repeated for N cycles, with each write done as a sweep or a pulse. One summary row per cycle, plus full I-V data for the cycles you list.Memristor Analysis (
pica/utils/Memristor_Analysis_GUI.py, in PICA Utils): reads the files the three programs write and reports V set / V reset, the retention ratio and drift, and the endurance window against cycle number. It only reads: it never changes or writes a file.
Shared behaviour:
A never-exceed voltage is set on the 2400 itself (its hardware voltage protection) in addition to the software limits.
Data files hold data only: a commented header, the column row and the data. Retries, reconnects and the end reason go to a separate
_log.txtfile next to the data.A bus error is retried at growing intervals, and the run continues after a reconnect. Nothing modal appears during or after a run.
The run-end beep uses Windows’
winsound. On Linux these three programs are silent; the console and banners still report the end of the run.
7. Releases and Versions
For downloadable release builds, please visit the Releases page.
8. Common Issues & Troubleshooting
This section covers the most common issues encountered when using PICA.
8.1 VISA Timeout Error or Resource Not Found
This is the most frequent issue and usually indicates a problem with the connection between the computer and the instrument. Follow these steps to resolve it:
Check Physical Connections: Ensure all cables (GPIB, USB, Ethernet) are securely connected to both the instrument and the computer.
Use the VISA Scanner: Run the VISA Instrument Scanner utility from the PICA launcher.
If the instrument appears in the list, the connection is working. Note the correct VISA address.
If the instrument does not appear, PICA cannot see it. Proceed to the next steps.
Power Cycle the Instrument: Turn the instrument off, wait a few seconds, and turn it back on. This can often resolve temporary communication hangs.
Restart the Computer: If the problem persists, a full restart can resolve driver or backend issues.
Shut down the computer completely, leaving the instrument turned off.
Start the computer.
Once the system is fully booted, run the PICA VISA scanner.
Turn on the instrument.
Check Drivers and Communication Mode:
Ensure you have the correct VISA backend installed (see the
A VISA Backend is Requiredwarning in the Installation & Setup section).If using a different communication interface (e.g., switching from GPIB to USB), verify that the necessary drivers are installed and that the instrument is configured for that mode.
8.2 Instrument Control and Delays
An important parameter to consider during concurrent control of instruments is the delay. The time between each step should be sufficient to ensure that all instruments (whether two or three) have completed their commanded actions. Sending a new command before an instrument has had time to process the previous one will definitely cause errors. It is also important to introduce proper delays for the system to reach equilibrium. Furthermore, during the initial setup, instruments should be given adequate delay time for all their internal components to stabilize and enter a ready state. In PICA, sufficient internal delays are provided in all modules. However, it was observed that some systems might need more delay time. Therefore, a parameter for initial delay is available in those modules’ GUI. Users should provide an appropriate initial delay time. This initial delay time parameter is in addition to the basic delay already contained in the module.
8.3 Forcing a Re-installation for Debugging
You can force a clean re-installation of the package from the source directory.
This command removes the old installation and replaces it with a fresh build.
pip install . --force-reinstall
9. Technical Reference
9.1 File Naming Convention
To ensure data integrity and easy sorting, PICA automatically generates filenames using a standardized format. This allows for easier parsing by external analysis tools.
Format: [SampleName]_[YYYYMMDD_HHMMSS]_[Identifier].dat
Example: SampleA_20251204_143000_IV.dat
Some modules write more than one file per run (for example a separate _log.txt for events, or a summary file next to the raw data); each name starts with the same sample name and timestamp.
9.2 GPIB Address Guide
PICA uses standard VISA resource strings. The addresses below are the ones on the authors’ rack (bus as seen on 21 Oct 2026), and several GUIs use them as defaults. Your rack will almost certainly differ: find the real addresses with the built-in Instrument Scanner or on each instrument’s front panel, and pick them from the address dropdown in each module. The Address Book button, in the GPIB Scanner and in the v2 launcher’s Instrument Status window, shows every address 0-30 as in use, reserved, free, avoid or never.
SRS SR830 lock-in:
GPIB1::8::INSTRTektronix AFG3022B:
GPIB1::11::INSTRLake Shore 350:
GPIB1::12::INSTRKeithley 6221:
GPIB1::13::INSTRKeysight E4980A:
GPIB1::17::INSTRLake Shore 340:
GPIB1::19::INSTRKeithley 197A:
GPIB1::20::INSTR(no*IDN?; answers with a reading)Cryo-con 34:
GPIB1::23::INSTRKeithley 2400:
GPIB1::24::INSTRKeithley 6517B:
GPIB1::27::INSTRKeithley 2182: address 7 (not seen on recent scans)
Novocontrol Alpha-AN:
GPIB0::10on the BDS PC (WinALPHA auto-detect; not SCPI; the launcher sends it only*IDN?)Keysight E4991B:
GPIB0::17on the BDS PC (WinALPHA auto-detect)
Free addresses, safest first: 26, 29, 25, 28, 2, 3, 4, 6. Avoid 1, 9, 10, 14, 15, 16, 18 and 22 (other makers’ factory defaults, and 15 is an old Lakeshore address). Never assign 0, 21 or 30.
9.3 Repository Mirroring
This project is manually backed up weekly to a GitLab repository.
9.4 Data File Format
The data file starts with commented header lines (starting with #) that hold metadata such as the sample name, the date and the run parameters. These are followed by a row of column names and then the data rows. The example below, from examples/, has a single header line; files from current modules carry more.
This structure makes it easy to import the data into various analysis programs like Origin, or to parse it programmatically with libraries like Pandas.
Example: Ultra Low Resistance (I-V) Module
# Sample: Low_R_Test_10ohm
Set Current (A),Measured Voltage (V),Resistance (Ohm)
-1.000000e-05,-1.037917e-04,1.037917e+01
-9.797980e-06,-1.017006e-04,1.037975e+01
Most other data files generated by PICA follow a similar structure.
9.5 Programmatic Surface
PICA is used through its GUI, not as a function library. There is no importable measurement API: each module is a self-contained program. This section lists the small part of the package that can be driven from Python or a shell, for scripted launches and tooling.
9.5.1 Entry points
Call |
What it does |
|---|---|
|
The launcher ( |
|
The same launcher ( |
|
The outdated classic launcher ( |
|
A text menu ( |
|
Runs one module directly. Every module is its own program and imports nothing from |
|
The release number. It lives only in |
Opening a GUI measurement module from a script. This does the same as clicking the module in the launcher or running its file: the module gets its own Python process and opens on its settings form. GUI modules ignore command-line arguments, so a script cannot pre-fill the form or press Start; the user fills in the settings and starts the run in the window. The launcher uses run_script_process(script_path, argv=None) for this. It changes into the module’s folder, sets sys.argv, and runs the file as __main__.
from multiprocessing import Process
from pica.main import PICALauncherApp, run_script_process
if __name__ == "__main__": # required on Windows, where child processes re-import this file
path = PICALauncherApp.SCRIPT_PATHS["Delta Mode I-V Sweep"]
Process(target=run_script_process, args=(path, [])).start()
9.5.2 The module registry
Two dictionaries describe every module without opening it. They are the closest thing PICA has to API metadata.
pica.main.PICALauncherApp.SCRIPT_PATHSmaps a module name to the absolute path of its file. It lives in the outdated classic launcher’s module but is the registry launcher v2 uses too.pica.module_info.MODULE_INFOmaps the same name to a dict withwhat(what the module measures and how),instruments(which instruments it drives),inputs(the settings its form asks for) and, for some modules,note.
import sys
from pica.main import PICALauncherApp
from pica.module_info import MODULE_INFO
sys.stdout.reconfigure(encoding="utf-8") # descriptions contain symbols such as Ω and µ
for name, path in sorted(PICALauncherApp.SCRIPT_PATHS.items()):
info = MODULE_INFO.get(name, {})
print(f"{name}\n file: {path}\n what: {info.get('what', '')}\n")
This prints every launcher entry with its file and its full description; it is the quickest way to see the whole protocol set in one place. Launcher v2 shows the full entry, with what the module measures, its instruments and its input fields, on the card that opens when the pointer rests on a module in Advanced Options.
10. Citation & Open Source
Collaborative Ecosystem: PICA is open-source (MIT License) to foster transparency. By providing the source code, the measurement protocols become auditable, ensuring that experimental conditions are reproducible and not hidden behind a proprietary “black box.” We encourage other research groups to adapt these scripts for their specific hardware configurations.
For the full preprint, please refer to the Preprint section.
10.1 Preprint
The full preprint of the PICA software suite, detailing its design, implementation, and applications, is available for review.
Preprint Page: https://prathameshnium.github.io/PICA-Python-Instrument-Control-and-Automation/publications/
Direct PDF Download: https://prathameshnium.github.io/PICA-Python-Instrument-Control-and-Automation/publications/pica-paper.pdf (alternate link at Academia.edu)
Citation:
@software{Deshmukh_PICA_2026,
author = {Deshmukh, Prathamesh Keshao and Mukherjee, Sudip},
title = {{PICA: Advanced High-Precision Transport Measurement Automation with Python}},
month = oct,
day = 27,
year = 2026,
publisher = {Zenodo},
version = {1.0.8},
doi = {10.5281/zenodo.18377216},
url = {https://doi.org/10.5281/zenodo.18377216}
}
11. Future Development
11.1 AC Resistivity (Lock-In)
Status: Under Development. The first modules have landed and are described in §6.11 — I-V, frequency scan and R-T, with either the SR830 or a Keithley 197A as the voltmeter. What remains is a full measurement campaign against a known sample, and the verification of the 197A command table against its printed interface manual.
Instruments: Keithley 6221 (AC Source) + SRS SR830 (DSP Lock-In Amplifier).
Predicted Resistance Range: ~ 20 nΩ to 1 MΩ.
Scientific Objective: Probes frequency-dependent transport phenomena.
Use Case: Useful for distinguishing between different conduction mechanisms by analyzing the frequency response of the sample’s resistance.
Workflow: The Keithley 6221 provides a precise AC excitation current, while the Lock-In Amplifier (SR830) extracts the signal amplitude and phase with high noise rejection, allowing for accurate ac resistivity measurements.
11.2 Standalone Executables
In the future, we also plan to develop executable (.exe) versions of the PICA software suite. This will remove the need for users to manage Python environments and dependencies, further simplifying the setup process and facilitating rapid adoption in laboratories.
11.3 New Utilities and Analysis Modules
A multi-PID setpoint simulator for CCR and LN2 probes now ships as pica/utils/PID_Simulator_GUI.py (v1.0.6). We plan to add more utility modules, such as simple data analysis modules. These additions will help to streamline the entire process from measurement to analysis, making PICA a more self-contained ecosystem.
12. Adding a New Instrument
The procedure for adding a new instrument module to PICA is described in the CONTRIBUTING.md file. Please refer to that guide for detailed, step-by-step instructions.
14. License
This project is licensed under the MIT License - see the LICENSE file for details.
15. Appendix A: Project File Structure
For developers and advanced users, the following reference outlines the PICA directory structure (v1.0.8; test files and assets abridged).
Note
To add a new module to the launcher, register its file in SCRIPT_PATHS in
pica/main.py (the registry the launcher shares with the outdated classic
launcher), then add it to CATALOG in pica/main_v2.py so it
appears in Advanced Options, and to QUICK_CATALOG in the same file if it also
belongs on the Quick Select screen. Then describe it in pica/module_info.py
(three lines: what it measures, which instruments it opens, what it asks for)
— that one entry feeds the hover card, the Ctrl+F search and the “You
enter” line on Quick Select, and a test fails if a catalogue row has no entry
or a launchable program is missing from the search.
PICA (Root Directory)/
.coveragerc
.gitignore
.readthedocs.yaml
CHANGELOG.md
CITATION.cff
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
MANIFEST.in
PICA_Utils_Portable.spec
README.md
codecov.yml
tools/
pica_utils_portable.py
legacy_stuff/
run_pica_legacy.py <-- Classic launcher (outdated)
pyproject.toml
requirements-dev.txt
requirements.txt
run_pica.py <-- Launcher, opens on Advanced Options (as pica-gui)
run_pica_v2.py <-- Launcher, opens on Quick Select
setup.py
.github/
workflows/
build_portable_utils.yml
build_preprint.yml
codeql.yml
docs.yml
draft-pdf.yml
lint.yml
test.yml
docs/
Instruments_Manuals_Lists.md
Novocontrol_GPIB_Runbook.md
Research_Impact.md
User_Manual.md
conf.py
index.md
requirements.txt
robots.txt
examples/
Low_R_Test_10ohm_20251218_163101_IV.dat
examples.md
paper/
paper.bib
paper.md
publications/
index.html
pica/
cli.py
main.py <-- Classic launcher (outdated); SCRIPT_PATHS used by main_v2
main_v2.py <-- Launcher (pica-gui)
module_info.py <-- Per-program descriptions, full names + fuzzy search (hover cards, Ctrl+F)
assets/ <-- Images, logos, icons
PPMS/ <-- PPMS helper utilities
PPMS_Plotter_GUI.py
PPMS_SeqVisualizer_GUI.py
PPMS_TimeEstimator_GUI.py
cryocon/ <-- Temperature control and sensing (Cryo-con 34)
Diagnostics_CC34_GUI.py
Sensor_Curve_Loader_CC34_GUI.py
Sensor_Curve_Viewer_CC34_GUI.py
T_Control_CC34_DirectControl_GUI.py
T_Sensing_CC34_GUI.py
keithley/
delta_mode/ <-- Ultra low resistance (K6221 + K2182)
Delta_RT_K6221_K2182_CC34_Sensing_GUI.py
Delta_RT_K6221_K2182_L340_Sensing_GUI.py
Delta_RT_K6221_K2182_L340_T_Control_GUI.py
Delta_RT_K6221_K2182_L350_Sensing_GUI.py
Delta_RT_K6221_K2182_L350_T_Control_GUI.py
IV_K6221_DC_Sweep_GUI.py
Instrument_Control/
Delta_K6221_K2182_L350_T_Sensing_Instrument_Control.py
Delta_K6221_K2182_Simple_Instrument_Control.py
k197a/ <-- Bench DMM logging (K197A)
Monitor_K197A_GUI.py
Instrument_Control/
Monitor_K197A_Instrument_Control.py
k2400/ <-- Mid resistance and memristor switching (K2400)
IV_K2400_GUI.py
K2400_DirectControl_GUI.py
Memristor_Endurance_K2400_GUI.py
Memristor_Retention_K2400_GUI.py
Memristor_Sweep_K2400_GUI.py
RT_K2400_CC34_T_Sensing_GUI.py
RT_K2400_L340_T_Control_GUI.py
RT_K2400_L340_T_Sensing_GUI.py
RT_K2400_L350_T_Control_GUI.py
RT_K2400_L350_T_Sensing_GUI.py
Instrument_Control/
IV_K2400_Loop_Instrument_Control.py
k2400_2182/ <-- Mid resistance, high precision (K2400 + K2182)
IV_K2400_K2182_GUI.py
RT_K2400_K2182_CC34_T_Sensing_GUI.py
RT_K2400_K2182_L340_T_Control_GUI.py
RT_K2400_K2182_L340_T_Sensing_GUI.py
RT_K2400_K2182_L350_T_Sensing_GUI.py
RT_K2400_K2182_T_Control_GUI.py
Instrument_Control/
IV_K2400_K2182_Instrument_Control.py
k6221_k197a/ <-- AC transport with a DMM (K6221 + K197A)
Frequency_Scan_K6221_K197A_GUI.py
IV_AC_K6221_K197A_GUI.py
RT_AC_K6221_K197A_CC34_T_Sensing_GUI.py
RT_AC_K6221_K197A_L340_T_Control_GUI.py
RT_AC_K6221_K197A_L340_T_Sensing_GUI.py
RT_AC_K6221_K197A_L350_T_Control_GUI.py
RT_AC_K6221_K197A_L350_T_Sensing_GUI.py
k6517b/
High_Resistance/ <-- High resistance (K6517B)
IV_K6517B_GUI.py
RT_K6517B_CC34_T_Sensing_GUI.py
RT_K6517B_L340_T_Control_GUI.py
RT_K6517B_L340_T_Sensing_GUI.py
RT_K6517B_L350_T_Control_GUI.py
RT_K6517B_L350_T_Sensing_GUI.py
Instrument_Control/
IV_K6517B_L350_T_Control_Instrument_Control.py
IV_K6517B_Simple_Instrument_Control.py
Pyroelectricity/ <-- Pyroelectric current and poling (K6517B)
Polling_K6517B_GUI.py
Pyroelectric_K6517B_L340_GUI.py
Pyroelectric_K6517B_L350_GUI.py
Instrument_Control/
Current_K6517B_Simple_Instrument_Control.py
Poling_K6517B_Instrument_Control.py
PyroDataVisualization_Simple_Instrument_Control.py
Pyroelectric_K6517B_Working_Instrument_Control.py
keysight/ <-- Capacitance and dielectric (E4980A)
CV_KE4980A_GUI.py
Correction_OpenShort_E4980A_GUI.py
Field_Step_Freq_Scan_E4980A_GUI.py
Frequency_Scan_E4980A_GUI.py
PPMS_Dielectric_Master_Tscan_Fscan_CC34_E4980A_GUI.py
PPMS_Dielectric_Master_Tscan_Fscan_E4980A_GUI.py
PPMS_Dielectric_Master_Tscan_Fscan_L340_E4980A_GUI.py
PPMS_Sync_Freq_Scan_CC34_E4980A_GUI.py
PPMS_Sync_Freq_Scan_E4980A_GUI.py
PPMS_Sync_Freq_Scan_L340_E4980A_GUI.py
Step_Frequency_Scan_E4980A_GUI.py
Step_Frequency_Scan_L340_E4980A_GUI.py
Temprature_Scan_E4980A_GUI.py
Temprature_Scan_L340_E4980A_GUI.py
Temprature_Scan_Passive_CC34_E4980A_GUI.py
Temprature_Scan_Passive_E4980A_GUI.py
Temprature_Scan_Passive_L340_E4980A_GUI.py
Instrument_Control/
CV_KE4980A_Simple_Instrument_Control.py
lakeshore/ <-- Temperature control and sensing (L350 / L340)
Sensor_Curve_Loader_L340_L350_GUI.py
Sensor_Curve_Viewer_L340_GUI.py
Sensor_Curve_Viewer_L350_GUI.py
T_Control_L340_DirectControl_GUI.py
T_Control_L340_RangeControl_GUI.py
T_Control_L340_Step_GUI.py
T_Control_L340_Step_GUI_advanced.py
T_Control_L350_DirectControl_GUI.py
T_Control_L350_RangeControl_GUI.py
T_Control_L350_Step_GUI.py
T_Control_L350_Step_GUI_advanced.py
T_Sensing_L340_GUI.py
T_Sensing_L350_GUI.py
Instrument_Control/
T_Control_L350_Simple_Instrument_Control.py
lockin/
sr830/ <-- AC transport with a lock-in (K6221 + SR830)
AC_Resistivity_K6221_SR830_GUI.py
Comms_SR830_GUI.py
Frequency_Scan_K6221_SR830_GUI.py
IV_AC_K6221_SR830_GUI.py
RT_AC_K6221_SR830_CC34_T_Sensing_GUI.py
RT_AC_K6221_SR830_L340_T_Control_GUI.py
RT_AC_K6221_SR830_L340_T_Sensing_GUI.py
RT_AC_K6221_SR830_L350_T_Control_GUI.py
RT_AC_K6221_SR830_L350_T_Sensing_GUI.py
Instrument_Control/
Comms_SR830_Instrument_Control.py
novocontrol/ <-- Broadband dielectric (Alpha-AN)
Alpha_GPIB_Diagnostic_32bit.py
Alpha_VISA_Diagnostic_64bit.py
Diagnostics_AlphaAN_GUI.py
Frequency_Scan_AlphaAN_32bit_GUI.py
Frequency_Scan_AlphaAN_GUI.py
CV_AlphaAN_GUI.py
Correction_OpenShort_AlphaAN_GUI.py
Step_Frequency_Scan_AlphaAN_GUI.py (+ _L340_)
Temprature_Scan_AlphaAN_GUI.py (+ _L340_)
Temprature_Scan_Passive_AlphaAN_GUI.py (+ _L340_, _CC34_)
Instrument_Control/
AlphaAN_FreqScan_Instrument_Control.py
CV_AlphaAN_Simple_Instrument_Control.py
pfeiffer/ <-- Pressure logging (TPG 361)
Pressure_Log_TPG361_GUI.py
tektronix/ <-- Function generator (AFG 3022B)
Function_Gen_AFG3022B_GUI.py
utils/ <-- Scanners, diagnostics, plotters and calculators
Diagnostics_Comms_Interfaces_GUI.py
Diagnostics_Connected_Devices_GUI.py
Diagnostics_Python_Env_GUI.py
Diagnostics_System_Info_GUI.py
GPIB_Instrument_Scanner_GUI.py
GPIB_Lifeline_CLI.py
GPIB_Scanner_32bit_CLI.py
GPIB_Scanner_32bit_GUI.py
GPIB_VISA_InterfaceTest_Simple_Instrument_Control.py
GUI_Basic_Format.py
List_Maker_GUI.py
MD_Ratio_Calculator_GUI.py
Ohms_Law_Calculator_GUI.py
Memristor_Analysis_GUI.py
PE_plotter.py
PID_Simulator_GUI.py
PlotterUtil_GUI.py
Quick_Calc_GUI.py
SCPI_Console_GUI.py
Time_Utility_GUI.py
Unit_Converter_GUI.py
parser.py
tests/ <-- Automated test suite (pytest, mocked VISA)
conftest.py
test_*.py (103 files)