BrkRaw converter hook for Bruker PRESS SVS NIfTI-MRS outputs (ported from spec2nii)
Project description
brkraw-mrs
BrkRaw converter hook package that adds single-voxel MRS conversion support to the brkraw ecosystem. This project ports the Bruker MRS workflow from spec2nii and packages it as a BrkRaw hook so it can be installed and used through BrkRaw's hook tooling.
What It Does
- Detects single-voxel MRS scans (PRESS/STEAM/SLASER by method name) and reads
raw spectroscopy data from
fidorrawdata.job0. - Converts interleaved real/imag to complex, infers dimensions, and writes NIfTI-MRS with a header extension JSON (NIfTI-2 preferred).
- Writes a JSON sidecar with NIfTI-MRS metadata for convenience.
The goal is to make single-voxel MRS data usable with the same downstream tools as MRI, so MRS workflows can benefit from the broader BrkRaw ecosystem.
Install (BrkRaw Hook Standard)
Install the Python package, then install the hook assets into BrkRaw:
pip install brkraw-mrs
brkraw hook install brkraw-mrs
To install by entrypoint name:
brkraw hook install mrs
To view the packaged hook docs:
brkraw hook docs brkraw-mrs --render
BrkRaw Usage
brkraw convert \
/path/to/bruker/PV_dataset \
--output /path/to/output \
--sidecar
Support Matrix
Tested datasets are based on the Bruker ParaVision standard datasets: https://www.bruker.com/protected/en/services/communities/pci-community/paravision-versions/paravision-standard-datasets.html
- PV360 3.5 PRESS: conversion tested
- PV360 3.6 PRESS: conversion tested
- PV360 3.7 PRESS: conversion tested
- Older ParaVision versions: not tested
- Other MRS sequences (STEAM, SLASER, others): not tested
Notes: Data ordering for PRESS SVS is assumed as:
(1, 1, 1, n_points, n_averages?, n_dynamics?, n_coils?)
If a dimension is missing or equals 1, it is omitted.
Contributing
This repository is shared as a prototype. The core BrkRaw maintainers are
primarily focused on MRI conversion and do not have deep MRS domain expertise.
We welcome MRS researchers and developers to validate the workflow and guide
ongoing development so it can evolve beyond a single-voxel prototype. Please
see CONTRIBUTING.md and start a discussion at:
https://github.com/orgs/BrkRaw/discussions/categories/brkraw-mrs
Attribution and License
This hook is a port of the spec2nii Bruker MRS workflow. See NOTICE for
attribution details and LICENSE for terms.
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_mrs-0.2.3.tar.gz.
File metadata
- Download URL: brkraw_mrs-0.2.3.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36d03f12d76ad1edeb1ac5333ac72088f942b6f336f72e481bd9bcb3d97a7a3e
|
|
| MD5 |
5b01d02fe81ce6f4fe4295f0e45dcd94
|
|
| BLAKE2b-256 |
06d0e44ff5a52ccbdf4a3ef7cbc9770a1aafa7ac1268902bf53d41c1fe41354d
|
Provenance
The following attestation bundles were made for brkraw_mrs-0.2.3.tar.gz:
Publisher:
publish.yml on BrkRaw/brkraw-mrs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brkraw_mrs-0.2.3.tar.gz -
Subject digest:
36d03f12d76ad1edeb1ac5333ac72088f942b6f336f72e481bd9bcb3d97a7a3e - Sigstore transparency entry: 843840812
- Sigstore integration time:
-
Permalink:
BrkRaw/brkraw-mrs@28efda9f37a08ac4d748e1caa92c93aa10d3c9be -
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@28efda9f37a08ac4d748e1caa92c93aa10d3c9be -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file brkraw_mrs-0.2.3-py3-none-any.whl.
File metadata
- Download URL: brkraw_mrs-0.2.3-py3-none-any.whl
- Upload date:
- Size: 21.1 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 |
742d6b5da212608a631ef4069da460e9452d2e5453f719aad3ec0f01f0b8d9c5
|
|
| MD5 |
d17196cf0ddbaa6e275ff98696db9e5e
|
|
| BLAKE2b-256 |
bf1066fc9497de096fd32e2bf2d674f14f9d347c01a0da3c1d610dd268068137
|
Provenance
The following attestation bundles were made for brkraw_mrs-0.2.3-py3-none-any.whl:
Publisher:
publish.yml on BrkRaw/brkraw-mrs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brkraw_mrs-0.2.3-py3-none-any.whl -
Subject digest:
742d6b5da212608a631ef4069da460e9452d2e5453f719aad3ec0f01f0b8d9c5 - Sigstore transparency entry: 843840818
- Sigstore integration time:
-
Permalink:
BrkRaw/brkraw-mrs@28efda9f37a08ac4d748e1caa92c93aa10d3c9be -
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@28efda9f37a08ac4d748e1caa92c93aa10d3c9be -
Trigger Event:
workflow_dispatch
-
Statement type: