# picotech/pypicosdk architecture

> Architecture diagram of the GitHub repository picotech/pypicosdk, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/picotech/pypicosdk
- Repository: https://github.com/picotech/pypicosdk

## Overview

pyPicoSDK is a Python interface to PicoScope hardware and the native PicoSDK. The user-facing workflow is to import a supported scope class, open a unit, configure acquisition, capture or stream samples, retrieve results, and close the unit. The README documents support for 6000E, 3000E/5000E, and 5000D families; the reference tree also shows capture, trigger, digital, signal-generation, and firmware capabilities. The graph maps the principal API, driver, acquisition, and shared-support layers. Some feature-specific implementation details are unsampled, so those capabilities are included without speculative internal links.

Main entry points: [`pypicosdk/base.py`](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/base.py) (Scope base), [`pypicosdk/ps6000a.py`](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/ps6000a.py) (6000A driver), [`pypicosdk/psospa.py`](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/psospa.py) (OSPA driver), [`pypicosdk/_drivers/_ps5000a.py`](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_drivers/_ps5000a.py) (5000D driver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Python API"]
  node_api["Public API<br/>[pypicosdk.py]"]
end

subgraph group_drivers["Scope drivers"]
  node_base["Scope base<br/>[base.py]"]
  node_driver5000["5000D driver<br/>[_ps5000a.py]"]
  node_driver6000["6000A driver<br/>[ps6000a.py]"]
  node_driverospa["OSPA driver<br/>[psospa.py]"]
end

subgraph group_acquisition["Acquisition features"]
  node_capture["Block capture<br/>[base.py]"]
  node_streaming["Streaming sessions<br/>[streaming.py]"]
  node_trigger["Triggering<br/>[base.py]"]
  node_signal["Signal generation<br/>[_ps5000a.py]"]
  node_digital["Digital inputs<br/>[psospa.py]"]
end

subgraph group_support["Shared support"]
  node_shared["Cross-driver methods"]
  node_sharedfamilies["Shared family features<br/>[ps6000a_psospa.py]"]
  node_shared4000["4000A compatibility<br/>[ps6000a_ps4000a.py]"]
  node_channels["Channel metadata<br/>[_channel_class.py]"]
  node_general["General helpers<br/>[_general.py]"]
  node_config["SDK configuration<br/>[_config.py]"]
  node_common["Platform utilities<br/>[common.py]"]
  node_constants["Device constants<br/>[constants.py]"]
  node_errors["Error definitions<br/>[_exceptions.py]"]
  node_errorlist["Driver error strings<br/>[error_list.py]"]
end

node_user(("Python user"))
node_native["PicoSDK native library"]

node_user -->|"imports"| node_api
node_api -->|"exports"| node_driver6000
node_api -->|"exports"| node_driverospa
node_api -->|"exports"| node_driver5000
node_api -->|"exports"| node_streaming
node_driver5000 -->|"inherits"| node_base
node_driver6000 -->|"inherits"| node_base
node_driverospa -->|"inherits"| node_base
node_streaming -->|"routes streaming"| node_driver6000
node_streaming -->|"routes streaming"| node_driverospa
node_base -->|"implements"| node_capture
node_base -->|"implements"| node_trigger
node_driver5000 -->|"implements"| node_signal
node_driverospa -->|"implements"| node_digital
node_driver5000 -.->|"calls driver API"| node_native
node_driver6000 -.->|"calls driver API"| node_native
node_driverospa -.->|"calls driver API"| node_native
node_driver5000 -->|"uses shared methods"| node_shared
node_driver6000 -->|"uses shared methods"| node_sharedfamilies
node_driverospa -->|"uses shared methods"| node_sharedfamilies
node_driver6000 -->|"uses compatibility"| node_shared4000
node_base -->|"uses metadata"| node_channels
node_base -->|"uses helpers"| node_general
node_base -->|"uses utilities"| node_common
node_common -->|"reads settings"| node_config
node_driver5000 -->|"uses exceptions"| node_errors
node_base -->|"uses error strings"| node_errorlist
node_driver6000 -->|"uses constants"| node_constants
node_driverospa -->|"uses constants"| node_constants

click node_api "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/pypicosdk.py"
click node_base "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/base.py"
click node_driver5000 "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_drivers/_ps5000a.py"
click node_driver6000 "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/ps6000a.py"
click node_driverospa "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/psospa.py"
click node_capture "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/base.py"
click node_streaming "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/streaming.py"
click node_trigger "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/base.py"
click node_signal "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_drivers/_ps5000a.py"
click node_digital "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/psospa.py"
click node_shared "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/shared/_ps5000a_ps6000a.py"
click node_sharedfamilies "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/shared/ps6000a_psospa.py"
click node_shared4000 "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/shared/ps6000a_ps4000a.py"
click node_channels "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_classes/_channel_class.py"
click node_general "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_classes/_general.py"
click node_config "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_config.py"
click node_common "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/common.py"
click node_constants "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/constants.py"
click node_errors "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_exceptions.py"
click node_errorlist "https://github.com/picotech/pypicosdk/blob/main/pypicosdk/error_list.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api,node_user toneBlue
class node_base,node_driver5000,node_driver6000,node_driverospa toneAmber
class node_capture,node_streaming,node_trigger,node_signal,node_digital toneMint
class node_shared,node_sharedfamilies,node_shared4000,node_channels,node_general,node_config,node_common,node_constants,node_errors,node_errorlist toneRose
class node_native toneIndigo
```

## Components

### Python API

- [Public API](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/pypicosdk.py): `pypicosdk/pypicosdk.py`

### Scope drivers

- [Scope base](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/base.py): `pypicosdk/base.py`
- [5000D driver](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_drivers/_ps5000a.py): `pypicosdk/_drivers/_ps5000a.py`
- [6000A driver](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/ps6000a.py): `pypicosdk/ps6000a.py`
- [OSPA driver](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/psospa.py): `pypicosdk/psospa.py`

### Acquisition features

- [Block capture](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/base.py): `pypicosdk/base.py`
- [Streaming sessions](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/streaming.py): `pypicosdk/streaming.py`
- [Triggering](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/base.py): `pypicosdk/base.py`
- [Signal generation](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_drivers/_ps5000a.py): `pypicosdk/_drivers/_ps5000a.py`
- [Digital inputs](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/psospa.py): `pypicosdk/psospa.py`

### Shared support

- [Cross-driver methods](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/shared/_ps5000a_ps6000a.py): `pypicosdk/shared/_ps5000a_ps6000a.py`
- [Shared family features](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/shared/ps6000a_psospa.py): `pypicosdk/shared/ps6000a_psospa.py`
- [4000A compatibility](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/shared/ps6000a_ps4000a.py): `pypicosdk/shared/ps6000a_ps4000a.py`
- [Channel metadata](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_classes/_channel_class.py): `pypicosdk/_classes/_channel_class.py`
- [General helpers](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_classes/_general.py): `pypicosdk/_classes/_general.py`
- [SDK configuration](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_config.py): `pypicosdk/_config.py`
- [Platform utilities](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/common.py): `pypicosdk/common.py`
- [Device constants](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/constants.py): `pypicosdk/constants.py`
- [Error definitions](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/_exceptions.py): `pypicosdk/_exceptions.py`
- [Driver error strings](https://github.com/picotech/pypicosdk/blob/main/pypicosdk/error_list.py): `pypicosdk/error_list.py`

### Other components

- **Python user**
- **PicoSDK native library**

## Connections

- Python user → Public API: imports (evidence: `README.md`)
- Public API → 6000A driver: exports (evidence: `pypicosdk/pypicosdk.py`)
- Public API → OSPA driver: exports (evidence: `pypicosdk/pypicosdk.py`)
- Public API → 5000D driver: exports (evidence: `pypicosdk/pypicosdk.py`)
- Public API → Streaming sessions: exports (evidence: `pypicosdk/pypicosdk.py`)
- 5000D driver → Scope base: inherits (evidence: `pypicosdk/_drivers/_ps5000a.py`)
- 6000A driver → Scope base: inherits (evidence: `pypicosdk/ps6000a.py`)
- OSPA driver → Scope base: inherits (evidence: `pypicosdk/psospa.py`)
- Streaming sessions → 6000A driver: routes streaming (evidence: `pypicosdk/streaming.py`)
- Streaming sessions → OSPA driver: routes streaming (evidence: `pypicosdk/streaming.py`)
- Scope base → Block capture: implements (evidence: `pypicosdk/base.py`)
- Scope base → Triggering: implements (evidence: `pypicosdk/base.py`)
- 5000D driver → Signal generation: implements (evidence: `pypicosdk/_drivers/_ps5000a.py`)
- OSPA driver → Digital inputs: implements (evidence: `pypicosdk/psospa.py`)
- 5000D driver → PicoSDK native library: calls driver API
- 6000A driver → PicoSDK native library: calls driver API
- OSPA driver → PicoSDK native library: calls driver API
- 5000D driver → Cross-driver methods: uses shared methods (evidence: `pypicosdk/_drivers/_ps5000a.py`)
- 6000A driver → Shared family features: uses shared methods (evidence: `pypicosdk/ps6000a.py`)
- OSPA driver → Shared family features: uses shared methods (evidence: `pypicosdk/psospa.py`)
- 6000A driver → 4000A compatibility: uses compatibility (evidence: `pypicosdk/ps6000a.py`)
- Scope base → Channel metadata: uses metadata (evidence: `pypicosdk/base.py`)
- Scope base → General helpers: uses helpers (evidence: `pypicosdk/base.py`)
- Scope base → Platform utilities: uses utilities (evidence: `pypicosdk/base.py`)
- Platform utilities → SDK configuration: reads settings (evidence: `pypicosdk/common.py`)
- 5000D driver → Error definitions: uses exceptions (evidence: `pypicosdk/_drivers/_ps5000a.py`)
- Scope base → Driver error strings: uses error strings (evidence: `pypicosdk/base.py`)
- 6000A driver → Device constants: uses constants (evidence: `pypicosdk/ps6000a.py`)
- OSPA driver → Device constants: uses constants (evidence: `pypicosdk/psospa.py`)
