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
<strong>A modular software suite for automating laboratory measurements in physics research.</strong>
17
14
</p>
18
15
19
16
---
@@ -22,186 +19,144 @@
22
19
23
20
**PICA (Python-based Instrument Control and Automation)** is a software suite designed to provide a robust framework for automating laboratory instruments in materials science and condensed matter physics research. 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.
24
21
25
-
A key architectural feature is the use of isolated process execution for each measurement module via Python's `multiprocessing` library, ensuring high stability and preventing inter-script conflicts. This platform is built to streamline data acquisition, enhance experimental reproducibility, and accelerate research workflows.
26
-
27
-
PICA is designed with a clear separation between the user interface (GUI) and the instrument control logic (backend). This modular approach makes the system easy to maintain, extend, and debug.
22
+
A key architectural feature is the use of **isolated process execution** for each measurement module via Python's `multiprocessing` library. This ensures high stability, prevents inter-script conflicts, and allows the main dashboard to remain responsive during long-running experiments.
28
23
29
-
**A Note on Recent Updates and Testing:**
30
-
31
-
> This software suite is actively used for daily laboratory measurements and is regularly tested on the physical instruments. Recently, a suite of automated tests has been integrated to improve code quality and stability. While these tests validate the core logic, the changes made to support them require a new round of thorough manual testing on the hardware to identify and resolve any practical bugs that may have been introduced. This process is currently underway, and further updates will be provided upon its completion.
The core design philosophy of PICA is the separation of concerns, implemented through a distinct **GUI-Backend** architecture for each measurement module.
42
-
43
-
-**GUI (Frontend):** Each measurement has a dedicated GUI script (e.g., `IV_K2400_GUI_v5.py`) built with `Tkinter`. It is responsible for all user interaction, parameter input, and data visualization (live plotting). It runs in the main process to remain responsive.
44
-
-**Backend:** The instrument control logic is encapsulated in a separate class (e.g., `Keithley2400_Backend`). This class handles all `PyVISA` communication, instrument configuration, and data acquisition commands.
45
-
-**Process Isolation:** When a measurement is started, the GUI launches its corresponding backend logic in a separate, isolated process using Python's `multiprocessing` library. This is the key to PICA's stability: a crash or error in one measurement script will not affect the main launcher or any other running experiments.
46
-
-**Communication:** The frontend and backend communicate via `multiprocessing.Queue` for thread-safe data exchange. The backend performs a measurement and places the data into a queue, which the frontend then reads to update plots and save to a file.
24
+
> **⚠️ Important Note on Testing & Validation**
25
+
>
26
+
> This software is actively used for daily laboratory measurements and has been verified on physical instruments (Keithley, Lakeshore, etc.).
27
+
>
28
+
> Recently, significant updates were made to the codebase to integrate **Automated CI/CD Testing** (simulations and logic checks). While these automated tests pass successfully, the refactoring required for them may have introduced subtle timing or hardware-specific regressions. **A comprehensive round of manual validation on the physical instruments is currently underway** to ensure full operational stability.
-**Centralized Control Dashboard:** A comprehensive GUI for launching all measurement modules.
68
-
-**Isolated Process Execution:** Each script operates in a discrete process, guaranteeing application stability and preventing resource conflicts.
69
-
-**Integrated VISA Instrument Scanner:** An embedded utility for discovering, identifying, and troubleshooting GPIB/VISA instrument connections.
70
-
-**Modular Architecture:** Each experimental setup is encapsulated in a self-contained module with direct access to its scripts and data directories.
71
-
-**Embedded Documentation:** In-application viewer for essential project documentation.
72
-
-**System Console Log:** A real-time log provides status updates, confirmations, and error diagnostics for all operations.
73
-
74
-
---
75
-
76
-
## Tech Stack & Dependencies
77
-
78
-
The core of PICA is built with a stack of robust and widely-used Python libraries.
46
+
## Architecture
79
47
80
-
-**Primary Language:****Python 3.9+**
81
-
-**Graphical User Interface:****Tkinter**
82
-
-**Instrument Communication:****PyVISA** (a Python wrapper for the NI-VISA library)
83
-
-**Numerical Operations:****NumPy**
84
-
-**Data Visualization:****Matplotlib**
85
-
-**Concurrency:****Multiprocessing** (a native Python library for process isolation)
48
+
The core design philosophy of PICA is the separation of concerns, implemented through a distinct **GUI-Backend** architecture for each measurement module.
86
49
87
-
All required packages are listed in the `requirements.txt` file for easy one-step installation.
50
+
-**GUI (Frontend):** Each measurement has a dedicated GUI script (e.g., `IV_K2400_GUI_v5.py`) built with `Tkinter`. It is responsible for user interaction, parameter input, and real-time data visualization using `Matplotlib`.
51
+
-**Backend:** The instrument control logic is encapsulated in separate classes (e.g., `Keithley2400_Backend`). This layer handles all `PyVISA` communication, SCPI command parsing, and data retrieval.
52
+
-**Process Isolation:** When a measurement starts, the GUI launches the backend logic in a separate, isolated process. This prevents a hardware timeout or script error from crashing the entire application suite.
53
+
-**Inter-Process Communication:** The frontend and backend communicate via thread-safe `multiprocessing.Queues`, allowing for high-speed data transfer without race conditions.
88
54
89
55
---
90
-
## Available Measurement Modules
91
-
92
-
The PICA suite is organized into modules, each containing a frontend GUI application and its corresponding backend logic for instrument control.
93
-
94
-
#### Low Resistance (Keithley 6221 / 2182)
95
-
***Delta Mode I-V Sweep**
96
-
***Delta Mode R vs. T (Active Control)**
97
-
***Delta Mode R vs. T (Passive Sensing)**
98
-
99
-
#### Mid Resistance (Keithley 2400)
100
-
***I-V Sweep**
101
-
***R vs. T (Active Control)**
102
-
***R vs. T (Passive Sensing)**
103
56
104
-
#### Mid Resistance, High Precision (Keithley 2400 / 2182)
105
-
***I-V Sweep**
106
-
***R vs. T (Active Control)**
107
-
***R vs. T (Passive Sensing)**
108
-
109
-
#### High Resistance (Keithley 6517B)
110
-
***I-V Sweep**
111
-
***R vs. T (Active Control)**
112
-
***R vs. T (Passive Sensing)**
113
-
114
-
#### Pyroelectric Measurement (Keithley 6517B)
115
-
***PyroCurrent vs. T**
116
-
117
-
#### Capacitance (Keysight E4980A)
118
-
***C-V Measurement**
57
+
## Core Features
119
58
120
-
#### Temperature Utilities (Lakeshore 350)
121
-
***Temperature Ramp**
122
-
***Temperature Monitor**
59
+
-**Centralized Control Dashboard:** A comprehensive GUI for launching all measurement modules.
60
+
-**Integrated VISA Instrument Scanner:** An embedded utility for identifying and troubleshooting GPIB/VISA connections via the NI-VISA backend.
61
+
-**Modular Design:** Each experimental setup is a self-contained module, making the codebase easy to extend.
62
+
-**Embedded Documentation:** In-application viewer for technical manuals and project guides.
63
+
-**System Console Log:** A real-time logging system that provides status updates and error diagnostics.
123
64
124
65
---
125
66
126
67
## Instrument Specifications
127
68
128
-
129
69
### Advanced Cryogenic Transport Measurement System
130
70
131
-
**Overview**
132
-
This facility provides users with a comprehensive, modular system for characterizing the full spectrum of electronic transport properties in cryogenic environments. The setup integrates multiple high-precision instruments to cover the entire resistance scale, from superconductors to perfect insulators.
This software controls a facility designed for characterizing the full spectrum of electronic transport properties in cryogenic environments (80 K to 320 K). The setup integrates multiple high-precision instruments to cover a resistance range spanning 24 orders of magnitude.
138
72
139
73
| Module | Configuration / Instrument | Use Case | Resistance Range |
2.**NI-VISA Driver:** You must install the [National Instruments VISA Driver](https://www.ni.com/en/support/downloads/drivers/download.ni-visa.html)for your operating system. This is required for Python's`pyvisa` library to communicate with the instruments.
86
+
1.**Python:** Python 3.10 or newer is recommended.
87
+
2.**NI-VISA Driver:** You must install the [National Instruments VISA Driver](https://www.ni.com/en/support/downloads/drivers/download.ni-visa.html)or an equivalent backend. This is required for the`pyvisa` library to communicate with the instruments.
Using a virtual environment is strongly recommended to avoid conflicts with other Python projects.
98
+
Recommended to verify dependencies and avoid conflicts.
165
99
```bash
166
100
# Create the virtual environment
167
101
python -m venv venv
168
102
169
-
# Activate the environment
170
-
# On Windows:
103
+
# Activate (Windows)
171
104
venv\Scripts\activate
172
-
#On macOS/Linux:
105
+
#Activate (macOS/Linux)
173
106
source venv/bin/activate
174
107
```
175
108
176
109
3. **Install Dependencies**
177
-
This project uses a `requirements.txt` file to manage all necessary packages.
178
110
```bash
179
111
pip install -r requirements.txt
180
112
```
181
113
182
114
4. **Launch the Application**
183
-
Execute the main launcher script from the project's root directory.
184
115
```bash
185
116
python PICA_v6.py
186
117
```
187
118
188
119
---
189
120
190
-
## 📚 Resources & Documentation
121
+
## 🧪 Running Tests
191
122
192
-
**Comprehensive Documentation:**
193
-
For detailed setup instructions, hardware interfacing guides, and troubleshooting, please refer to the **[PICA User Manual](docs/User_Manual.md)** located in the `docs/` directory.
123
+
This repository includes a robust test suite using `pytest`. It mocks hardware interactions and GUI components, allowing the logic to be verified in a headless environment (CI).
194
124
195
-
**Instrument Manuals:**
196
-
A collection of official instrument manuals is provided within the `_assets/Manuals/` directory for technical reference.
125
+
To run the tests locally:
126
+
127
+
1. **Install Test Dependencies:**
128
+
```bash
129
+
pip install pytest pytest-cov flake8
130
+
```
131
+
132
+
2. **Run the Test Suite:**
133
+
```bash
134
+
python -m pytest
135
+
```
136
+
137
+
3. **Generate Coverage Report:**
138
+
```bash
139
+
# Generates an HTML report in the htmlcov/ directory
140
+
python -m pytest --cov=. --cov-report=html
141
+
```
142
+
143
+
The testing pipeline verifies:
144
+
***Package Integrity:** Ensures all scripts compile and import correctly.
145
+
***GUI Layouts:** Validates that `Tkinter` and `Matplotlib` widgets initialize without errors (using mocked graphics).
146
+
***Backend Logic:** Simulates measurement loops (e.g., Temperature Ramps) to verify logic flow without needing physical instruments connected.
197
147
198
148
---
199
149
200
-
## How to Cite
150
+
## 📚 Resources & Documentation
151
+
152
+
***User Manual:** Detailed setup and troubleshooting guides are available in [docs/User_Manual.md](docs/User_Manual.md).
153
+
***Instrument Manuals:** Original PDF manuals forthe supported hardware are locatedin`assets/Manuals/`.
201
154
202
-
If you use this software in your research, please cite it. This helps to credit the work involved in creating and maintaining this resource.
155
+
---
156
+
157
+
## Citation
203
158
204
-
#### BibTeX Entry
159
+
If you use this software in your research, please cite it using the following BibTeX entry:
205
160
206
161
```bibtex
207
162
@software{Deshmukh_PICA_2023,
@@ -211,37 +166,5 @@ If you use this software in your research, please cite it. This helps to credit
- **Affiliation:** *[UGC-DAE Consortium for Scientific Research, Mumbai Centre](https://www.csr.res.in/Mumbai_Centre)*
245
-
246
-
#### Funding
247
-
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