You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PICA (Python-based Instrument Control and Automation) is a modular, open-source software suite specifically designed to automate complex characterisation experiments and provide a robust framework for automating laboratory instruments in materials science and condensed matter physics research.
34
+
Developed to operate as a custom laboratory-built measurement system, PICA provides a unifying graphical user interface (GUI) for orchestrating high-precision instruments, specifically Keithley SourceMeters/Nanovoltmeters, Lakeshore Temperature Controllers, and Keysight LCR Meters. The suite regulates the cryogenic environment to perform automated protocols such as temperature-dependent resistivity, current-voltage (I-V) characteristics, and pyroelectric current measurements.
35
+
The suite features a central graphical user interface (GUI), the **PICA Launcher**, which serves as a dashboard for managing and executing a variety of characterisation experiments. Built to streamline data acquisition and enhance experimental reproducibility, PICA leverages Python's `multiprocessing` library to ensure high stability by isolating each measurement process.
32
36
33
-
**PICA (Python-based Instrument Control and Automation)** is a modular software suite designed to provide a robust framework for automating laboratory instruments in materials science and condensed matter physics research.
34
37
35
-
The suite features a central graphical user interface (GUI), the **PICA Launcher**, which serves as a dashboard for managing and executing a variety of characterization experiments. Built to streamline data acquisition and enhance experimental reproducibility, PICA leverages Python's `multiprocessing` library to ensure high stability by isolating each measurement process.
38
+
## 2\. Statement of Need
39
+
40
+
Advancements in experimental physics critically depend on the accurate characterization of material properties under extreme physical conditions. Such experiments typically require the coordinated operation and precise control of multiple instruments sourced from different vendors.
41
+
42
+
Researchers are often faced with a choice between using expensive proprietary software platforms such as LabVIEW or developing custom measurement scripts from scratch. Python libraries such as PyVISA and PyMeasure provide robust low-level driver support and are essential for instrument communication and control. However, these libraries primarily function as developer-oriented toolkits: they generally require users to possess detailed knowledge of measurement protocols and, in the case of PyVISA, familiarity with SCPI (Standard Commands for Programmable Instruments). Furthermore, users must design and implement their own graphical user interfaces (GUIs) tailored to specific experimental workflows. These libraries also do not natively provide comprehensive multithreading support, thereby requiring users to understand and manage concurrency and other computational aspects themselves.
43
+
44
+
By contrast, LabVIEW offers a graphical programming paradigm that simplifies certain aspects of instrument control but introduces other limitations. Its visual programming model is difficult to integrate with modern software engineering practices such as version control, and its proprietary nature constrains the extent to which users can modify low-level behaviour compared to Python-based solutions.
45
+
46
+
This situation reveals a clear gap for an open-source, laboratory-ready framework that provides well-tested measurement protocols together with an intuitive user interface, enabling experimentalists to perform sophisticated measurements without directly interacting with source code. At the same time, being implemented in open-source Python would preserve the ability for advanced users to modify virtually any component of the system and to contribute enhancements back to the project. Such a framework would foster a more open and collaborative scientific ecosystem, facilitating reproducibility, extensibility, and community-driven development in experimental physics research.
47
+
48
+
PICA was developed at the UGC–DAE Consortium for Scientific Research, Mumbai Centre, a research institute under the Government of India. The mandate of the institute is to support universities, including those in remote locations, in conducting advanced research. The open-source nature of PICA is fully aligned with this mandate, as it facilitates broader access to computational tools and thereby promotes and enhances the research capabilities of the scientific community.
49
+
50
+
We tried to reduce dependencies, making it suitable for the laboratory systems that are not connected to the internet by providing stable, scientifically validated protocols and a robust user interface for conducting measurements on our ATMS (Advanced Transport Measurement System), a laboratory-built platform comprising custom-developed hardware and software.
51
+
52
+
Although PICA was initially designed for our in-house ATMS infrastructure, the underlying code and framework are sufficiently generalizable for use in a wide range of experimental setups. We particularly encourage researchers in developing countries, where access to advanced measurement systems may be limited, to adopt and adapt this tool. Furthermore, the architecture allows for modular extensions, enabling the integration of additional functionalities as required by users.
36
53
37
54
### Core Features
38
55
39
-
***Centralized Control Dashboard:** A comprehensive GUI for launching all measurement modules.
56
+
***Accessibility:** PICA provides a professional dashboard that enables researchers without programming experience to configure and execute complex measurements.
57
+
***Physical Validation:** PICA protocols are routinely employed for cryogenic transport measurements in the temperature range 80–320 K at the UGC–DAE Consortium for Scientific Research, Mumbai Centre. Particular emphasis is placed on ensuring that the protocols are physically valid and that any artifacts arising from instrument output start-up transients, synchronization errors, or other physical anomalies are identified and eliminated.
58
+
59
+
***Centralized Control Dashboard:** A comprehensive GUI for launching all measurement modules.
40
60
***CLI Mode:** A new command-line interface for headless operation (e.g., via SSH or Raspberry Pi).
41
61
***Isolated Process Execution:** Each script operates in a discrete process, guaranteeing application stability.
42
62
***Integrated VISA Instrument Scanner:** An embedded utility for discovering and troubleshooting connections.
63
+
***Operational Transparency:** Unlike black-box solutions, PICA exposes real-time logs that facilitate debugging in the event of errors or anomalies, thereby enhancing scientific reproducibility.
43
64
***Automated Testing:** Integrated CI/CD pipelines for logic verification.
44
65
45
-
> **⚠️ Important Note on Validation**
46
-
>
47
-
> While Version 15.0 introduces **Automated CI/CD Testing** that passes all logic checks, the refactoring required for packaging may introduce subtle timing differences on physical hardware. **A comprehensive round of manual validation on physical instruments is currently underway** to ensure full operational stability matches the simulations.
48
-
49
-
-----
50
-
51
-
## 2\. 🚀 Getting Started
66
+
## 3\. Getting Started
52
67
53
68
### Hardware Setup
69
+
Prior to executing the software, verify that all physical connections between the measurement instruments and the computer hosting PICA are correctly and securely established. [1]
70
+
71
+
There are multiple methods for establishing communication between an instrument and a computer, including direct USB, LAN (Ethernet), or via a USB‑to‑GPIB converter. Use a reliable, compliant interface cable (e.g., Keysight 82357B) to connect the computer to the instruments.
54
72
55
-
Before running the software, ensure your physical connections are established:
73
+
If a converter (e.g., GPIB‑to‑USB) is used, confirm that its status indicator is active (typically a green LED). Similarly, for LAN connections, check the link/activity indicators on the instrument and network interface. Many instruments also provide a “REMOTE” or similar status indication on their front panel to show that a remote communication session has been established.
56
74
57
-
***USB to GPIB Converter:** Use a reliable interface cable (e.g., Keysight 82357B) to connect your computer to the instruments.
58
-
***Status Check:** Ensure the converter's status light is active (usually green).
59
-
***Instrument Config:** Enable GPIB communication on your physical instruments and note their addresses (e.g., 12, 24).
75
+
Instrument configuration: enable the appropriate communication interface (GPIB, USB, or LAN) on each physical instrument and record their corresponding addresses. If necessary, modify the instrument address and related communication parameters through the instrument’s configuration or setup menu..
60
76
61
77
### Software Installation
62
78
63
79
**Prerequisites:**
64
80
65
-
***Python:** Version 3.10 or newer.
66
-
***NI-VISA Driver:** Install the National Instruments VISA Driver for your OS to enable communication.
81
+
***Python:** Version 3.10 or newer.
82
+
***NI-VISA Driver:** Install the National Instruments VISA Driver for your OS to enable communication.
83
+
84
+
Install the required dependencies as specified in the `requirements.txt` file.
67
85
68
86
**Installation Steps (Package Mode):**
69
87
@@ -78,12 +96,12 @@ PICA is now structured as a standard Python package. We recommend installing it
78
96
79
97
2. **Create and Activate Virtual Environment:**
80
98
81
-
**Windows:*
99
+
**Windows:*
82
100
```bash
83
101
python -m venv venv
84
-
venv\Scripts\activate
102
+
.\venv\Scripts\activate
85
103
```
86
-
**macOS/Linux:*
104
+
**macOS/Linux:*
87
105
```bash
88
106
python3 -m venv venv
89
107
source venv/bin/activate
@@ -98,9 +116,9 @@ PICA is now structured as a standard Python package. We recommend installing it
98
116
99
117
### Running the Software
100
118
101
-
You can now run PICA in two modes depending on your environment:
119
+
PICA can be executed in two modes: a graphical user interface (GUI) for interactive use and a command-line interface (CLI) for headless or automated environments.
102
120
103
-
**1. Graphical Launcher (GUI)**
121
+
#### 1. Graphical Launcher (GUI)
104
122
The standard dashboard for desktop users with a monitor.
105
123
106
124
```bash
@@ -118,16 +136,9 @@ python pica_cli.py
118
136
119
137
You can quickly verify which instruments are connected and recognized by your system using the built-in scanner or this Python snippet:
The core design philosophy of PICA is the **separation of concerns**, implemented through a distinct Frontend-Backend architecture.
133
144
@@ -138,7 +149,7 @@ The core design philosophy of PICA is the **separation of concerns**, implemente
138
149
139
150
-----
140
151
141
-
## 4\. 🔬 Available Measurement Modules
152
+
## 5\. Available Measurement Modules
142
153
143
154
The suite is organized into modules, each containing a specific experimental setup:
144
155
@@ -153,29 +164,12 @@ The suite is organized into modules, each containing a specific experimental set
153
164
154
165
-----
155
166
156
-
## 5\. 🧪 Testing & Validation
157
-
158
-
PICA now includes a robust test suite using `pytest`. It mocks hardware interactions, allowing the logic to be verified in a headless environment.
159
-
160
-
To run the tests locally:
161
-
162
-
1. **Install Test Dependencies:**
163
-
```bash
164
-
pip install pytest pytest-cov flake8
165
-
```
166
-
2. **Run the Test Suite:**
167
-
```bash
168
-
python -m pytest
169
-
```
170
-
3. **Generate Coverage Report:**
171
-
```bash
172
-
# Generates an HTML report in the htmlcov/ directory
173
-
python -m pytest --cov=. --cov-report=html
174
-
```
167
+
# Example usage
168
+
# Functionality
175
169
176
170
-----
177
171
178
-
## 6\. 📚 Technical Reference
172
+
## 7\. Technical Reference
179
173
180
174
### Instrument Specifications
181
175
@@ -206,8 +200,7 @@ Specifications for instruments used in the PICA project.
206
200
207
201
### GPIB Address Guide
208
202
209
-
Default addresses forPICA instruments. Use the **Test GPIB** utilityin the GUI to confirm.
210
-
203
+
Default communication addresses forselected instruments. Use the **Test GPIB** utility availablein the graphical user interface (GUI) to verify proper connectivity and configuration.
211
204
***Lakeshore 340:**`GPIB0::12::INSTR`
212
205
***Lakeshore 350:**`GPIB1::15::INSTR`
213
206
***Keithley 2400:**`GPIB1::4::INSTR`
@@ -238,7 +231,7 @@ PICA (Root Directory)/
238
231
239
232
-----
240
233
241
-
## 7\. 📄 Citation, Attribution & Funding
234
+
## 8\. Citation, Attribution & Funding
242
235
243
236
### Citation
244
237
@@ -247,30 +240,21 @@ If you use this software in your research, please cite it.
247
240
**BibTeX:**
248
241
249
242
```bibtex
250
-
@software{Deshmukh_PICA_2023,
243
+
@software{Deshmukh_PICA_2025,
251
244
author = {Deshmukh, Prathamesh Keshao and Mukherjee, Sudip},
252
245
title = {{PICA: Python-based Instrument Control and Automation Software Suite}},
***Institute:** UGC-DAE Consortium for Scientific Research, Mumbai Centre
266
-
267
-
### Funding
268
-
269
-
Financial support for this work was provided under **SERB-CRG project grant No. CRG/2022/005676** from the Anusandhan National Research Foundation (ANRF), a statutory body of the Department of Science & Technology (DST), Government of India.
270
254
271
255
-----
272
256
273
-
## 8\. 📝 Version History
257
+
## 9\. Version History
274
258
-----
275
259
[1.0.1] - 2025-12-02 (Current)
276
260
Changed
@@ -305,4 +289,44 @@ Research & Documentation
305
289
**Version 14.0**
306
290
307
291
***GUI Upgrade:** Updated frontend scripts to new standardized "Version 5" interfaces.
To ensure measurement reliability and correct software operation, comprehensive testing is required. To this end, all modules were thoroughly tested in conjunction with the corresponding hardware. In addition to automated procedures, extensive manual testing was performed directly on the instrument, with particular emphasis on identifying limitations and edge conditions. In practice, each individual measurement effectively serves as a distinct test case. [1]
295
+
296
+
Recognizing that full validation of the software suite is difficult without access to the completeset of instrument hardware, a limited set of automated tests has been implemented to provide at least a baseline level of verification.
297
+
298
+
For manual testing of the PICA graphical user interface (GUI), the user can interact with different components, such as resizing the measurement panel and the plotting panel, and launching multiple instances of PICA modules (e.g., different measurement modules, the plotting utility, and the launcher). On modern hardware, the system has been empirically verified not to hang under such multitasking conditions.
299
+
300
+
A particularly accessible component fortesting is the plotting utility, <#plotterutil#>. It can be evaluated by repeatedly plotting data and modifying the data points to confirm that all visual elements updatein real time. The performance of the measurement modules can likewise be assessed under concurrent operation to ensure there are no issues with multitasking. In addition, one should verify that all links and buttons from the main dashboard to the individual modules functioncorrectly and lead to the intended targets.
301
+
# Automated tests
302
+
## 6\. Testing & Validation
303
+
PICA now includes a robust test suite using `pytest`. It mocks hardware interactions, allowing the logic to be verified in a headless environment.
304
+
305
+
To run the tests locally:
306
+
307
+
1. **Install Test Dependencies:**
308
+
```bash
309
+
pip install pytest pytest-cov flake8
310
+
```
311
+
2. **Run the Test Suite:**
312
+
```bash
313
+
python -m pytest
314
+
```
315
+
3. **Generate Coverage Report:**
316
+
```bash
317
+
# Generates an HTML report in the htmlcov/ directory
318
+
python -m pytest --cov=. --cov-report=html
319
+
```
320
+
# Community guidelines
321
+
We encourage the community to contribute to PICA, either by developing new modules or by correcting existing issues. Individuals interested in contributing are invited to report problems or feature requests via the GitHub “Issues” tab. We are available to provide support with the installation and configuration of PICA, as well as with the setup of custom measurement systems; therefore, prospective users should not hesitate to contact us.
322
+
Additional details regarding the code of conduct for contributors are available at:
323
+
324
+
### Authors
325
+
326
+
***Lead Developer:** Prathamesh Keshao Deshmukh
327
+
***Principal Investigator:** Dr. Sudip Mukherjee
328
+
***Institute:** UGC-DAE Consortium for Scientific Research, Mumbai Centre
329
+
330
+
### Funding
331
+
332
+
Financial support for this work was provided under **SERB-CRG project grant No. CRG/2022/005676** from the Anusandhan National Research Foundation (ANRF), a statutory body of the Department of Science & Technology (DST), Government of India.
0 commit comments