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
\<h1 align="center"\>PICA: Python-based Instrument Control and Automation\</h1\>
12
+
13
+
\<p align="center"\>
14
+
\<strong\>A modular software suite for automating laboratory measurements in physics research.\</strong\>
15
+
\</p\>
16
+
17
+
-----
17
18
18
19
## Overview
19
20
@@ -27,42 +28,54 @@ A key architectural feature is the use of **isolated process execution** for eac
27
28
>
28
29
> 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.
The core design philosophy of PICA is the separation of concerns, implemented through a distinct **GUI-Backend** architecture for each measurement module.
49
62
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.
63
+
-**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`.
64
+
-**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.
65
+
-**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.
66
+
-**Inter-Process Communication:** The frontend and backend communicate via thread-safe `multiprocessing.Queues`, allowing for high-speed data transfer without race conditions.
54
67
55
-
---
68
+
-----
56
69
57
70
## Core Features
58
71
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.
72
+
-**Centralized Control Dashboard:** A comprehensive GUI for launching all measurement modules.
73
+
-**Integrated VISA Instrument Scanner:** An embedded utility for identifying and troubleshooting GPIB/VISA connections via the NI-VISA backend.
74
+
-**Modular Design:** Each experimental setup is a self-contained module, making the codebase easy to extend.
75
+
-**Embedded Documentation:** In-application viewer for technical manuals and project guides.
76
+
-**System Console Log:** A real-time logging system that provides status updates and error diagnostics.
64
77
65
-
---
78
+
-----
66
79
67
80
## Instrument Specifications
68
81
@@ -77,7 +90,7 @@ This software controls a facility designed for characterizing the full spectrum
Recommended to verify dependencies and avoid conflicts.
113
+
99
114
```bash
100
115
# Create the virtual environment
101
116
python -m venv venv
102
-
117
+
103
118
# Activate (Windows)
104
119
venv\Scripts\activate
105
120
# Activate (macOS/Linux)
106
121
source venv/bin/activate
107
122
```
108
123
109
124
3. **Install Dependencies**
125
+
110
126
```bash
111
127
pip install -r requirements.txt
112
128
```
113
129
114
130
4. **Launch the Application**
131
+
115
132
```bash
116
133
python PICA_v6.py
117
134
```
118
135
119
-
---
136
+
-----
120
137
121
138
## 🧪 Running Tests
122
139
@@ -125,34 +142,65 @@ This repository includes a robust test suite using `pytest`. It mocks hardware i
125
142
To run the tests locally:
126
143
127
144
1. **Install Test Dependencies:**
145
+
128
146
```bash
129
147
pip install pytest pytest-cov flake8
130
148
```
131
149
132
150
2. **Run the Test Suite:**
151
+
133
152
```bash
134
153
python -m pytest
135
154
```
136
155
137
156
3. **Generate Coverage Report:**
157
+
138
158
```bash
139
159
# Generates an HTML report in the htmlcov/ directory
140
160
python -m pytest --cov=. --cov-report=html
141
161
```
142
162
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.
163
+
-----
164
+
165
+
## Project History & Evolution
166
+
167
+
PICA has evolved from a collection of offline utility scripts into a modular software suite. The development timeline highlights the shift from manual instrument handling to a fully automated, asynchronous control system.
168
+
169
+
>**📜 Project Lore:** For a detailed chronological log of the project's development history, including the offline prototyping phase and specific version changelogs, please refer to [`docs/Change_Logs.md`](docs/Change_Logs.md).
This period marked the transition to the **GUI-Backend isolated architecture**.
184
+
185
+
* **Multiprocessing:** Implementation of `multiprocessing` to separate UI threads from instrument control loops.
186
+
* **UI Standardization:** Adoption of a unified dark-themed UI across all measurement modules.
187
+
* **New Modes:** Added "Passive Sensing" modes for R-T measurements and integrated plotting utilities.
188
+
189
+
### **2022 – 2024: Inception & Prototyping**
190
+
191
+
* **2024 (Migration):** The codebase was migrated from offline laboratory System to GitHub. The structure was reorganized from loose scripts into categorized instrument measuremenet modules (Keithley/Lakeshore).
192
+
* **2022 (Origins):** Development began in an air-gapped laboratory environment. Initial work focused on proof-of-concept scripts using `PyVISA` to replace manual data logging.
193
+
* *Project Concept:* Proposed by Dr. Sudip Mukherjee to automate characterization workflows.
194
+
* *Early Prototypes:* Built iteratively alongside hardware upgrades and cryogenic probe development at UGC-DAE CSR.
195
+
196
+
-----
149
197
150
198
## 📚 Resources & Documentation
151
199
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/`.
200
+
* **User Manual:** Detailed setup and troubleshooting guides are available in [docs/User\_Manual.md](https://www.google.com/search?q=docs/User_Manual.md).
201
+
* **Instrument Manuals:** Original PDF manuals for the supported hardware are located in `assets/Manuals/`.
154
202
155
-
---
203
+
-----
156
204
157
205
## Citation
158
206
@@ -165,10 +213,10 @@ If you use this software in your research, please cite it using the following Bi
0 commit comments