Skip to content

Commit 0f19384

Browse files
2 parents f7adfed + cbb833a commit 0f19384

2 files changed

Lines changed: 125 additions & 19 deletions

File tree

docs/paper.bib

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,71 @@
11

2+
@article{harris2020numpy,
3+
title = {Array programming with {NumPy}},
4+
volume = {585},
5+
issn = {0028-0836, 1476-4687},
6+
url = {https://www.nature.com/articles/s41586-020-2649-2},
7+
doi = {10.1038/s41586-020-2649-2},
8+
number = {7825},
9+
journal = {Nature},
10+
author = {Harris, Charles R. and Millman, K. Jarrod and Van Der Walt, Stéfan J. and Gommers, Ralf and Virtanen, Pauli and Cournapeau, David and Wieser, Eric and Taylor, Julian and Berg, Sebastian and Smith, Nathaniel J. and Kern, Robert and Picus, Matti and Hoyer, Stephan and Van Kerkwijk, Marten H. and Brett, Matthew and Haldane, Allan and Del Río, Jaime Fernández and Wiebe, Mark and Peterson, Pearu and Gérard-Marchant, Pierre and Sheppard, Kevin and Reddy, Tyler and Weckesser, Warren and Abbasi, Hameer and Gohlke, Christoph and Oliphant, Travis E.},
11+
month = sep,
12+
year = {2020},
13+
pages = {357--362},
14+
}
15+
16+
@article{hunter2007matplotlib,
17+
title = {Matplotlib: {A} {2D} {Graphics} {Environment}},
18+
volume = {9},
19+
copyright = {https://ieeexplore.ieee.org/Xplorehelp/downloads/license-information/IEEE.html},
20+
issn = {1521-9615},
21+
shorttitle = {Matplotlib},
22+
url = {http://ieeexplore.ieee.org/document/4160265/},
23+
doi = {10.1109/MCSE.2007.55},
24+
number = {3},
25+
journal = {Computing in Science \& Engineering},
26+
author = {Hunter, John D.},
27+
year = {2007},
28+
pages = {90--95},
29+
}
30+
31+
@misc{pandas2025,
32+
title = {pandas-dev/pandas: {Pandas}},
33+
copyright = {BSD 3-Clause "New" or "Revised" License},
34+
shorttitle = {pandas-dev/pandas},
35+
url = {https://zenodo.org/doi/10.5281/zenodo.3509134},
36+
publisher = {Zenodo},
37+
author = {The pandas development team},
38+
month = sep,
39+
year = {2025},
40+
doi = {10.5281/ZENODO.3509134},
41+
}
42+
43+
@misc{jermain2020pymeasure,
44+
title = {ralph-group/pymeasure: {PyMeasure} 0.8},
45+
copyright = {Open Access},
46+
shorttitle = {ralph-group/pymeasure},
47+
url = {https://zenodo.org/record/3732545},
48+
abstract = {This release brings a number of new features including live image plotting and measurement sequencing. Python 3.8 is now supported New Measurement Sequencer allows for running over a large parameter space (@CasperSchippers) New image plotting feature for live image measurements (@jmittelstaedt) Improvements to VISA adapter (@moritzj29) Added Tektronix AFG 3000, Keithley 2750 (@StePhanino, @dennisfeng2) Documentation improvements (@mivade) Fix to ScientificInput for float strings (@moritzj29) New validator: strict\_discrete\_range (@moritzj29) Improvements to Recorder thread joining Migrating the ReadtheDocs configuration to version 2 National Instruments Virtual Bench initial support (@moritzj29) Thanks to everyone who contributed to this release!},
49+
publisher = {Zenodo},
50+
author = {Jermain, Colin and {Minhhai} and {Jmittelstaedt} and {Dennisfeng2} and {StePhanino} and {Unclemoe} and Rowlands, Graham and {Henri-Louis Girard} and Schippers, Casper and Schneider, Michael and {Chweiser} and Buchner, Christoph and Spirito, Davide and Feinstein, Ben and {Nowacklab-User} and {Sumatran Tiger} and Vaillant, Ghislain Antony and Boxtel, Tim Van and {Marc-Alexandre Chan} and {Troylf} and {Mhdg} and {Ederag} and {Ronan-Sensome} and Lund, Morten Enemark and DePalatis, Mike and Lauritzen, Magne and Julian and P, Guen and {Fattotora} and {Chrische-Xx}},
51+
month = mar,
52+
year = {2020},
53+
doi = {10.5281/ZENODO.3732545},
54+
}
55+
56+
@article{grecco2023pyvisa,
57+
title = {{PyVISA}: the {Python} instrumentation package},
58+
volume = {8},
59+
copyright = {http://creativecommons.org/licenses/by/4.0/},
60+
issn = {2475-9066},
61+
shorttitle = {{PyVISA}},
62+
url = {https://joss.theoj.org/papers/10.21105/joss.05304},
63+
doi = {10.21105/joss.05304},
64+
number = {84},
65+
journal = {Journal of Open Source Software},
66+
author = {Grecco, Hernán E. and Dartiailh, Matthieu C. and Thalhammer-Thurner, Gregor and Bronger, Torsten and Bauer, Florian},
67+
month = apr,
68+
year = {2023},
69+
pages = {5304},
70+
}
71+

docs/paper.md

Lines changed: 55 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,84 @@
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"
1415
- name: Sudip Mukherjee
15-
affiliation: 1
16+
orcid: 0000-0003-4734-9157
17+
affiliation: "1,2"
18+
corresponding: true
19+
email: sudipm@csr.res.in
1620
affiliations:
1721
- name: UGC-DAE Consortium for Scientific Research, Mumbai Centre, India
1822
index: 1
19-
date: 21 November 2025
23+
- name: Savitribai Phule Pune University, Pune, India
24+
index: 2
25+
date: 27 November 2025
2026
bibliography: paper.bib
27+
2128
---
2229

2330
# Summary
2431

32+
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.
33+
34+
<figure>
35+
<img src="pica-architecture-schematic.png" width="70%" />
36+
<figcaption>System architecture of PICA</figcaption>
37+
</figure>
38+
39+
# Statement of need
40+
41+
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.
42+
PICA fills this niche by providing a **"lab-ready" application layer** built on top of these libraries. It differentiates itself through.
43+
* **Accessibility:** A professional dashboard that allows researchers without coding experience to configure and run a complex measurement protocol immediately.
44+
* **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
45+
* **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.
46+
* **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
47+
* **Operational Transparency:** Unlike a Black box solution, PICA exposes the real-time command logs, aiding in debugging and ensuring scientific reproducibility.
48+
49+
50+
# Design and Implementation
2551

26-
[Your Summary Here]
52+
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.
2753

28-
# Statement of Need
54+
### Process Isolation and Concurrency
2955

30-
[Your Statement of Need Here]
56+
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.
57+
* **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.
58+
* **Responsiveness:** The `tkinter`-based frontend remains responsive for live data plotting (using `matplotlib` [@hunter2007matplotlib] with blitting) even while the backend waits for hardware triggers.
59+
* **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.
3160

32-
# Features
61+
### Hardware Abstraction Layer
3362

63+
PICA utilises **PyVISA** [@grecco2023pyvisa] to abstract the low-level communication protocols (GPIB, USB, Ethernet). The software implements a strict initialisation routine:
64+
1. **Connection Verification:** A built-in "VISA Instrument Scanner" queries the bus ('*IDN?) to map the connected instrument addresses.
65+
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.
66+
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.
3467

35-
[Your Features Here]
68+
### Operational Transparency
3669

37-
# Software Architecture
70+
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`),
71+
showing every command sent to the instrument. This allows researchers to verify measurement protocols and troubleshoot hardware instantly.
3872

73+
### Testing and Simulation
3974

75+
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.
4076

41-
[Your Architecture Description Here]
4277

4378
# Acknowledgements
4479

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.
80+
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.
81+
PD would also like to thank Akshay Kamble for his valuable discussions on instrument control and for his effective assistance in resolving technical issues.
4682

4783
# References
4884

0 commit comments

Comments
 (0)