BrkRaw converter hook for SORDINO-ZTE reconstruction
Project description
brkraw-sordino
SORDINO-ZTE reconstruction hook for BrkRaw.
Install
pip install -e .
Hook install
brkraw hook install brkraw-sordino
This installs the hook rule from the package manifest (brkraw_hook.yaml).
Usage
Once installed, brkraw applies the hook automatically when a dataset matches the rule.
Basic conversion:
brkraw convert /path/to/study --scan-id 3 --reco-id 1
The hook behaves the same whether invoked via the CLI or via the Python API (the same hook entrypoint and arguments are used).
To explicitly pass hook options (or override defaults), use --hook-arg / --hook-args-yaml below.
Hook options
Hook arguments can be passed via brkraw convert using --hook-arg with the
entrypoint name (sordino):
brkraw convert /path/to/study -s 3 -r 1 \
--hook-arg sordino:ext_factors=1.2 \
--hook-arg sordino:offset=2 \
--hook-arg sordino:split_ch=false
Pass hook options via YAML (--hook-args-yaml)
BrkRaw can also load hook arguments from YAML. Generate a template like this:
brkraw hook preset sordino -o hook_args.yaml
Edit the generated YAML, then pass it to brkraw convert (repeatable):
brkraw convert /path/to/study -s 3 -r 1 --hook-args-yaml hook_args.yaml
Example:
hooks:
sordino:
ext_factors: 1.2
offset: 2
split_ch: false
# as_complex: true # optional, return (real, imag)
# cache_dir: ~/.brkraw/cache/sordino # optional (add manually if needed)
Notes:
- CLI
--hook-argvalues override YAML. - YAML supports both
{hooks: {sordino: {...}}}and{sordino: {...}}shapes. - You can also set
BRKRAW_CONVERT_HOOK_ARGS_YAML(comma-separated paths).
Supported keys:
ext_factors: scalar or 3-item sequence (default: 1.0)ignore_samples: int (default: 1)offset: int (default: 0)num_frames: int or null (default: None)correct_spoketiming: bool (default: false)correct_ramptime: bool (default: true)offreso_ch: int or null (default: None)offreso_freq: float (default: 0.0)mem_limit: float (default: 0.5)clear_cache: bool (default: true)split_ch: bool (default: false, merge channels)as_complex: bool (default: false, return complex as (real, imag))cache_dir: string path (default: ~/.brkraw/cache/sordino)
Notes
- The hook reconstructs data using an adjoint NUFFT and returns magnitude images by default.
- Converted NIfTI outputs apply slope/intercept scaling for uint16 storage.
ext_factorsscales the affine around the FOV center during conversion.- Multi-channel data defaults to merged channels; set
split_ch=trueto keep channels split. - When
split_ch=false, magnitude uses RSS while complex uses coherent sum. - Orientation is normalized when the first 3D axes are spatial; see
notebooks/orientation.ipynb. - Cache files live under
~/.brkraw/cache/sordino(orBRKRAW_CONFIG_HOME) and are cleared whenclear_cache=true.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brkraw_sordino-0.2.1.tar.gz.
File metadata
- Download URL: brkraw_sordino-0.2.1.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e19803d2b4e7a197a7ffa239b3094bae5c3b9edea675b7c3b9fb8fa2cce4a228
|
|
| MD5 |
688fc3f78dfa1c41030519566c10550b
|
|
| BLAKE2b-256 |
756816aa44ebdf6eb1c62081e2e8dab08785a6e814fc8e93b1c9d91e217904d8
|
Provenance
The following attestation bundles were made for brkraw_sordino-0.2.1.tar.gz:
Publisher:
publish.yml on BrkRaw/brkraw-sordino
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brkraw_sordino-0.2.1.tar.gz -
Subject digest:
e19803d2b4e7a197a7ffa239b3094bae5c3b9edea675b7c3b9fb8fa2cce4a228 - Sigstore transparency entry: 864585969
- Sigstore integration time:
-
Permalink:
BrkRaw/brkraw-sordino@4ed1c145bc77d2ab0e301f276cfe56f28c35913d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/BrkRaw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4ed1c145bc77d2ab0e301f276cfe56f28c35913d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file brkraw_sordino-0.2.1-py3-none-any.whl.
File metadata
- Download URL: brkraw_sordino-0.2.1-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
799ebb90009d1ced066130e2bbe170f9f17550249f6095f1ce0da8273c233547
|
|
| MD5 |
f37ca22405b39fc208850110f95bc2c2
|
|
| BLAKE2b-256 |
1c6f80284ced60a4c3ac6fcf6b87c3c6eab66f866317b197029700d6722b6537
|
Provenance
The following attestation bundles were made for brkraw_sordino-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on BrkRaw/brkraw-sordino
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brkraw_sordino-0.2.1-py3-none-any.whl -
Subject digest:
799ebb90009d1ced066130e2bbe170f9f17550249f6095f1ce0da8273c233547 - Sigstore transparency entry: 864586012
- Sigstore integration time:
-
Permalink:
BrkRaw/brkraw-sordino@4ed1c145bc77d2ab0e301f276cfe56f28c35913d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/BrkRaw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4ed1c145bc77d2ab0e301f276cfe56f28c35913d -
Trigger Event:
workflow_dispatch
-
Statement type: