Skip to content

Commit 8f49c90

Browse files
paper moved from private repo to PICA
1 parent bb8cd92 commit 8f49c90

1 file changed

Lines changed: 59 additions & 19 deletions

File tree

docs/paper.md

Lines changed: 59 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,88 @@
11
---
2-
title: 'PICA: Python-based Instrument Control and Automation Software Suite'
2+
title: 'PICA: A Python-based Instrument Control and Automation Suite for Material Characterisation'
33
tags:
4-
- Python
5-
- experimental physics
6-
- laboratory automation
7-
- instrument control
8-
- materials science
9-
- PyVISA
4+
- python
5+
- hardware control
6+
- automation
7+
- pyvisa
8+
- condensed matter physics
9+
- cryogenics
10+
- scpi
1011
authors:
11-
- name: Prathamesh Keshao Deshmukh
12+
- name: Prathamesh Deshmukh
1213
orcid: 0009-0008-3278-0837
13-
affiliation: 1
14+
affiliation: "1,2"
15+
- name: Srishti Kashyap
16+
affiliation: "1,2"
17+
- name: Swastika Mukherjee
18+
affiliation: "1,2"
1419
- name: Sudip Mukherjee
15-
affiliation: 1
20+
orcid: 0000-0003-4734-9157
21+
affiliation: "1,2"
22+
corresponding: true
23+
email: sudipm@csr.res.in
1624
affiliations:
1725
- name: UGC-DAE Consortium for Scientific Research, Mumbai Centre, India
1826
index: 1
19-
date: 21 November 2025
27+
- name: Savitribai Phule Pune University, Pune, India
28+
index: 2
29+
date: 27 November 2025
2030
bibliography: paper.bib
31+
2132
---
2233

2334
# Summary
2435

36+
PICA (Python-based Instrument Control and Automation) is a modular, open-source software suite designed to automate complex characterisation experiments in condensed matter physics. Developed to operate a custom laboratory-built measurement system, PICA provides a unified graphical user interface (GUI) for orchestrating high-precision instruments, specifically Keithley SourceMeters/Nanovoltmeters, Lakeshore Temperature Controllers, and Keysight LCR metres. The suite regulates the cryogenic environment to perform automated protocols such as temperature-dependent resistivity, current voltage (I-V) characteristics, and pyroelectric current measurement.
37+
38+
<figure>
39+
<img src="pica-architecture-schematic.png" width="70%" />
40+
<figcaption>System architecture of PICA</figcaption>
41+
</figure>
42+
43+
# Statement of need
44+
45+
Advancements in experimental physics depend on the precise characterisation of material properties under extreme physical conditions. Researchers have to choose between expensive proprietary software like LabVIEW or developing a custom measurement script from scratch. While Python libraries such as PyVISA [] and PyMeasure [] provide excellent low-level driver support. They function as a primary developer toolkit. They often require significant boilerplate code to handle data visualisation and error handling, effectively forcing physicists to become software engineers.
46+
PICA fills this niche by providing a **"lab-ready" application layer** built on top of these libraries. It differentiates itself through.
47+
* **Accessibility:** A professional dashboard that allows researchers without coding experience to configure and run a complex measurement protocol immediately.
48+
* **Physical Validation:** Unlike general-purpose drivers, PICA's protocols are actively used for cryogenic transport measurements (80K - 320K) at the UGC DAE Consortium for Scientific Research, Mumbai Centre.Ensuring that the protocols are physically accurate and lab tested
49+
* **Process Isolation:** PICA deploys a `multiprocessing` architecture that runs instrumentation control logic in an isolated process. This ensures that hardware timeouts or driver crashes do not freeze the main dashboard, a common problem in single-threaded Python scripts.
50+
* **Modular CLI Architecture:** As demonstrated in the repository, measurement modules also contain a CLI measurement module, which allows researchers to utilise PICA's measurement protocol and logic for headless automation or integration into other workflows without GUI overhead
51+
* **Operational Transparency:** Unlike a Black box solution, PICA exposes the real-time command logs, aiding in debugging and ensuring scientific reproducibility.
52+
53+
54+
# Design and Implementation
2555

26-
[Your Summary Here]
56+
PICA is built on a modular architecture characterised by self-contained modules, ensuring future extensibility. This design allows individual measurement protocols to be modified independently or added without impacting the core system stability.
2757

28-
# Statement of Need
58+
### Process Isolation and Concurrency
2959

30-
[Your Statement of Need Here]
60+
Unlike simple script-based automation, PICA decouples the User Interface (UI) from the instrumentation control logic. It utilises Python's standard 'multiprocessing' libraries to spawn isolated processes for measurement tasks.
61+
* **Stability:** If an instrument hangs or a communication bus times out, the isolated process can be terminated safely without freezing the main GUI or losing previous data.
62+
* **Responsiveness:** The `tkinter`-based frontend remains responsive for live data plotting (using `matplotlib` [@hunter2007matplotlib] with blitting) even while the backend waits for hardware triggers.
63+
* **Data Integrity:** Experimental data integrity is prioritised through a "write on acquisition" strategy. Data is structured using `pandas` [@pandas2025] and is saved to a CSV file immediately after every acquisition point, preventing data loss in the event of a power failure or program/system crash.
3164

32-
# Features
65+
### Hardware Abstraction Layer
3366

67+
PICA utilises **PyVISA** [@grecco2023pyvisa] to abstract the low-level communication protocols (GPIB, USB, Ethernet). The software implements a strict initialisation routine:
68+
1. **Connection Verification:** A built-in "VISA Instrument Scanner" queries the bus ('*IDN?) to map the connected instrument addresses.
69+
2. **State Sanitisation:** To eliminate the influence of all previous experiments, any stored data, cache in buffers, and existing settings or configurations, the instruments are explicitly reset (`*RST`) and buffers are cleared (`TRAC:CLE`), thereby providing a clean initial state before each measurement.
70+
3. **Graceful Shutdown:** A "Safety Shutdown Routine" logic ensures that sources are ramped down to zero and heaters are disabled safely, even if the software is interrupted unexpectedly.
3471

35-
[Your Features Here]
72+
### Operational Transparency
3673

37-
# Software Architecture
74+
To support the scientific reproducibility of experimental results, PICA rejects hidden automation and replaces the "black box" paradigm with real-time console logs. Each measurement module has a console that records time-stamped actions (e.g., `[10:05:25] Keithley 6221: Ramping current to 10 mA`),
75+
showing every command sent to the instrument. This allows researchers to verify measurement protocols and troubleshoot hardware instantly.
3876

77+
### Testing and Simulation
3978

79+
To ensure measurement reliability, all of these modules were thoroughly tested with the corresponding hardware. Additionally, to facilitate development without constant access to physical instruments, PICA includes a testing suite that uses `pytest`. The suite employs `unittest.mock` to simulate VISA resources, allowing for the verification of backend logic streams, class structure, and command sequences in a continuous integration environment.
4080

41-
[Your Architecture Description Here]
4281

4382
# Acknowledgements
4483

45-
We acknowledge the financial support provided under the 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.
84+
We acknowledge the financial support provided under the SERB-GRG project grant No. CRG/2022/005676 from the Anusandhan National Research Foundation (ANRF), a statutory body of the Department of Science and Technology (DST), Government of India.
85+
PD would also like to thank Akshay Kamble for his valuable discussions on instrument control and for his effective assistance in resolving technical issues.
4686

4787
# References
4888

0 commit comments

Comments
 (0)