Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'VisuAcqGradEncoding' is not defined #103

Open
biancadepifanio opened this issue Feb 20, 2023 · 2 comments
Open

'VisuAcqGradEncoding' is not defined #103

biancadepifanio opened this issue Feb 20, 2023 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@biancadepifanio
Copy link

Describe the bug
Hello :) I am trying to convert in BIDS an old dataset acquired with pv 5.1. I created the .csv file and the .json template with bids_helper, but when I tried to convert the dataset with bids_convert I received this error:

Traceback (most recent call last): File "/home/imaging/anaconda3/bin/brkraw", line 8, in <module> sys.exit(main()) File "/home/imaging/anaconda3/lib/python3.9/site-packages/brkraw/scripts/brkraw.py", line 476, in main build_bids_json(dset, row, fname, json_fname, slope=slope, offset=offset) File "/home/imaging/anaconda3/lib/python3.9/site-packages/brkraw/lib/utils.py", line 411, in build_bids_json dset.save_json(row.ScanID, row.RecoID, fname, dir=row.Dir, File "/home/imaging/anaconda3/lib/python3.9/site-packages/brkraw/lib/loader.py", line 548, in save_json json_obj = self._parse_json(scan_id, reco_id, metadata) File "/home/imaging/anaconda3/lib/python3.9/site-packages/brkraw/lib/loader.py", line 506, in _parse_json val = meta_get_value(v, acqp, method, visu_pars) File "/home/imaging/anaconda3/lib/python3.9/site-packages/brkraw/lib/utils.py", line 180, in meta_get_value val = meta_get_value(vi, acqp, method, visu_pars) File "/home/imaging/anaconda3/lib/python3.9/site-packages/brkraw/lib/utils.py", line 170, in meta_get_value return meta_check_express(value, acqp, method, visu_pars) File "/home/imaging/anaconda3/lib/python3.9/site-packages/brkraw/lib/utils.py", line 252, in meta_check_express exec('{} = {}'.format(k, val)) File "<string>", line 1, in <module> NameError: name 'VisuAcqGradEncoding' is not defined

Looking into the visu_pars of that dataset (attached here visu_pars.txt ) I realized the parameter 'VisuAcqGradEncoding' is missing and overall the file 'visu_pars' seems to be different from the one created with pv6.
Do you have any suggestion on how to overcome this problem and still use bids_convert?

Thank you :)

@dvm-shlee dvm-shlee added this to the v0.4.0 release milestone Jul 1, 2023
@dvm-shlee dvm-shlee added the bug Something isn't working label Jul 1, 2023
@dvm-shlee
Copy link
Member

@biancadepifanio Sorry for the late respond to this issue. I think it is same issue reported by other, but could you share the rawdata which the error (it would be helpful if you remove all other non-relevant scans) and corresponding json and csv files, so I can test and ensure the patch works for your case?

Thank you!

@dvm-shlee dvm-shlee self-assigned this May 15, 2024
@dvm-shlee dvm-shlee modified the milestones: v0.4.0 release, BIDS May 15, 2024
@Bin-Jing0908
Copy link

Hi, shlee, I met the same error of 'VisuAcqGradEncoding' is not defined when using brkraw on the Bruker 7.0T MRI data, is there any effective manner to solve the question? Thanks.
In addition, besides brkraw, do you know any other batch code to reorient the orignial rat mri data to match the SIGMA template? I need to change the Bruker data to BIDS data, but brkraw met the abovementioned error, so I have to change the data into nifti data first, and then reorient the nifti data to match SIGMA template, and finally change all nifti data into BIDS data. I find a 'orient.py' in the brkraw github, but I don't find how to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

3 participants