wtclarke / spec2nii

Multi-format in vivo MR spectroscopy conversion to NIFTI
Other
24 stars 19 forks source link

Bruker PRESS (ParaVision 3.5) #146

Open peter-mri opened 1 month ago

peter-mri commented 1 month ago

I have some MRS data from Bruker (ParaVision360 v 3.5), PRESS sequence. Both single coil and array. Either way I'm getting this error:

spec2nii bruker 8/pdata/1/2dseq

Traceback (most recent call last): File "/home/peter/fsl/lib/python3.11/site-packages/spec2nii/bruker.py", line 81, in yield_bruker d.query(queries) File "/home/peter/fsl/lib/python3.11/site-packages/brukerapi/dataset.py", line 713, in query raise FilterEvalFalse brukerapi.exceptions.FilterEvalFalse: FilterEvalFalse

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/peter/fsl/bin/spec2nii", line 10, in sys.exit(main()) ^^^^^^ File "/home/peter/fsl/lib/python3.11/site-packages/spec2nii/spec2nii.py", line 701, in main spec2nii(*args) File "/home/peter/fsl/lib/python3.11/site-packages/spec2nii/spec2nii.py", line 297, in init args.func(args) File "/home/peter/fsl/lib/python3.11/site-packages/spec2nii/spec2nii.py", line 670, in bruker self.imageOut, self.fileoutNames = read_bruker(args) ^^^^^^^^^^^^^^^^^ File "/home/peter/fsl/lib/python3.11/site-packages/spec2nii/bruker.py", line 44, in read_bruker for data, orientation, dwelltime, meta, name in yield_bruker(args): File "/home/peter/fsl/lib/python3.11/site-packages/spec2nii/bruker.py", line 83, in yield_bruker raise ValueError(f'Bruker dataset {d.path} is not suitable for conversion to mrs_nifti') ValueError: Bruker dataset 8/pdata/1/2dseq is not suitable for conversion to mrs_nifti

I'm using spec2nii version 0.7.4 (can't figure how to update to current version...)

I'm happy to share the data if it helps. Cheers, Peter

wtclarke commented 1 month ago

Hi Peter,

Yes please to data, though I can't promise any quick fixes.

Also, is this the new version of PV360? I've heard that quite a few things have changed.

Will

peter-mri commented 1 month ago

Thanks Will! There's no major rush. I've attached file from PRESS data from a single channel (volume) coil. These are from a "fat" phantom, so don't look for familiar peaks... We got version 3.5 a few months ago, so it should be out for at least half a year, if not longer. Unfortunately there seems to be changes from version to version... Unfortunately I don't know the details of differences between various v3.x versions. There's no fid file (instead, there's a 64bit fid_proc.64). I've also loaded the data in Bruker's TopSpin software for viewing, which creates additional files (in pv2tsdata), those may not always be available...

The one piece of information from Bruker forum that may or may not help: _Group Delay parameter which is normally in the ACQP file as ##$GRPDLY. In PV360 this parameter is set to -1. The correct value (76.0833) is found in the ACQ_RxFilterInfo parameter in the ACQP file as:

$ACQ_RxFilterInfo=( 2 )

(76.0833333333333, 0, 8, 19.8698903048866, 31) (0, 15.0833333333333, 27,19.8698903048866, 31) The complex fid data must be shifted by the Group Delay (=round(76.0833)) indices and zeros appended to the array to keep the fid size fixed to the original value._

8.zip