scans#
Work with multiple scans simultaneously for analysis.
The working set (scans.selected) is normally chosen from the UI; code
may also enumerate (scans.find / scans.projects) and load
(scans.load) scans directly. The active acquisition scan is
scans.current and stays separate from the analysis set.
Example
current
#
current() -> Scan | None
The active acquisition scan (mirrors state.current_scan).
Never part of, and never disturbed by, the analysis working set.
apply_graph
#
apply_graph(
graph: str | list[PostprocessingNode] | None = None,
) -> dict[str, GraphResult]
Run a processing graph over every scan in the working set.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
graph
|
str | list[PostprocessingNode] | None
|
Which graph to run — |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, GraphResult]
|
A mapping of each scan's label (or id) to its |
find
#
find(
project: str | None = None, group: str | None = None
) -> list[Scan]
List scans in a project (default: the current project) as lazy proxies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
str | None
|
Project name; defaults to the current project. |
None
|
group
|
str | None
|
Optional group/folder filter. |
None
|
load
#
load(
scan_id: str,
project: str | None = None,
label: str | None = None,
analyze: bool = False,
) -> Scan
Add a scan to the analysis working set and materialize it in memory.
Loads the scan as stored — no preprocessing or peak detection is applied.
Call Scan.preprocess / Scan.perform_analysis / Scan.analyze
explicitly to process it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scan_id
|
str
|
The scan id (UUID). |
required |
project
|
str | None
|
Project name; defaults to the current project. |
None
|
label
|
str | None
|
Optional label for referring to the scan later. |
None
|
analyze
|
bool
|
Opt in to running preprocessing + peak detection on load
( |
False
|
Returns:
| Type | Description |
|---|---|
Scan
|
The |
release
#
Remove a scan from the working set, or clear the whole set if None.