Parameters¶
Parameters in the file¶
Every zea HDF5 file stores all parameters needed to process the acquisition
alongside the raw data. They are split into two groups:
- Probe (
probe/) Fixed for the whole acquisition — element geometry, center frequency, bandwidth, lens properties. Shared across all tracks. Defined by
ProbeSpec.- Scan (
scan/) Per-track transmit sequence — delays, apodizations, angles, waveforms, sound speed. Each track has its own
ScanSpec.
See the Group reference table for the complete field listing.
zea.Parameters¶
load_parameters() merges the probe and scan groups into a
single Parameters object and adds derived quantities
(wavelength, n_tx, grid, xlims/zlims, selected_transmits):
with zea.File("data.hdf5") as f:
parameters = f.load_parameters() # single-track
parameters = f.tracks[0].load_parameters() # multi-track
Config¶
A config is a YAML file (loaded as Config) that specifies where
the data lives, the pipeline to run, the device to use, and any parameter
overrides.
>>> from zea import Config
>>> from zea.config import check_config
>>> config = Config.from_path("../configs/config_picmus_rf.yaml")
>>> config = check_config(config) # fills defaults, validates
>>> config.pipeline.operations
['demodulate',
{'name': 'downsample', 'params': {'factor': 4}},
{'name': 'beamform', 'params': {'beamformer': 'delay_and_sum', 'enable_pfield': False, 'num_patches': 200}},
'envelope_detect',
'normalize',
'log_compress']
>>> config.to_yaml("my_config.yaml")
Supported keys¶
data — where to find the file
Key |
Default |
Description |
|---|---|---|
|
|
Full path to the HDF5 file. Supports local absolute paths, paths relative
to the user data root (set in |
|
|
Whether to use local data ( |
|
|
Which frames to load: |
parameters — override any field from the Group reference or pass custom keys straight through to the pipeline:
parameters:
center_frequency: 5.0e6
xlims: [-0.02, 0.02]
grid_size_x: 512
pipeline — list of operations (see Pipeline):
Key |
Default |
Description |
|---|---|---|
|
|
Ordered list of operations. Each entry is either an operation name (string)
or a mapping with |
|
|
JIT scope: |
|
|
Whether operations expect a leading batch dimension. |
Top-level keys
Key |
Default |
Description |
|---|---|---|
|
|
Target hardware: |
|
|
Device indices to exclude from auto-selection (int or list of ints). |
|
|
Git commit or branch recorded for reproducibility. |
The top-level config is open: arbitrary extra sections (model:, etc.)
are accepted and passed through unchanged.
API reference¶
|
Config class. |
- zea.config.check_config(config, verbose=False)[source]
Check a config given dictionary