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

brkraw tonii_all fails while tonii succeeds #2

Closed
gdevenyi opened this issue May 30, 2020 · 5 comments
Closed

brkraw tonii_all fails while tonii succeeds #2

gdevenyi opened this issue May 30, 2020 · 5 comments

Comments

@gdevenyi
Copy link
Collaborator

$ brkraw --version
brkraw v0.3.3rc1
$ python --version
Python 3.7.6
$ brkraw info raw/
Paravision 5.1
--------------
UserAccount:    galdan
Date:           2020-01-31
Researcher:     MCH_DEV_PHT_001
Subject ID:     20200131_MCH_DEV_PHT_001
Session ID:     dev
Study ID:       1
Date of Birth:  None
Sex:            male
Weight:         5 kg
Subject Type:   Human
Position:       Supine          Entry:  HeadFirst

[ScanID]        Sequence::Protocol::[Parameters]
[001]   FLASH (pvm)::01-TriPilot-multi::
        [ TR: 200 ms, TE: 3 ms, pixelBW: 500.80 Hz, FlipAngle: 30 degree]
    [01] dim: 2D, matrix_size: 256 x 256 x 15, fov_size: 40 x 40 (unit:mm)
         spatial_resol: 0.156 x 0.156 x 1.000 (unit:mm), temporal_resol: 25600.000 (unit:msec)
[002]   FLASH (pvm)::exvivoDanFLASH::
        [ TR: 21.47 ms, TE: 5.11 ms, pixelBW: 96.90 Hz, FlipAngle: 20 degree]
    [01] dim: 3D, matrix_size: 228 x 258 x 130, fov_size: 15.96 x 18.06 x 9.1 (unit:mm)
         spatial_resol: 0.070 x 0.070 x 0.070 (unit:mm), temporal_resol: 1920266.000 (unit:msec)
$ brkraw tonii raw/
NifTi file is genetared... [20200131_MCH_DEV_PHT_001_1-01-1]
NifTi file is genetared... [20200131_MCH_DEV_PHT_001_1-02-1]
$ brkraw tonii_all raw/
Traceback (most recent call last):
  File "/home/gdevenyi/miniforge3/bin/brkraw", line 8, in <module>
    sys.exit(main())
  File "/home/gdevenyi/miniforge3/lib/python3.7/site-packages/brkraw/scripts/brkraw.py", line 143, in main
    study = BrukerLoader(sub_path)
  File "/home/gdevenyi/miniforge3/lib/python3.7/site-packages/brkraw/lib/loader.py", line 88, in __init__
    self._pvobj = load(path)
  File "/home/gdevenyi/miniforge3/lib/python3.7/site-packages/brkraw/lib/loader.py", line 16, in load
    return PvDatasetDir(path)
  File "/home/gdevenyi/miniforge3/lib/python3.7/site-packages/brkraw/lib/pvobj.py", line 145, in __init__
    self._parse_info()
  File "/home/gdevenyi/miniforge3/lib/python3.7/site-packages/brkraw/lib/pvobj.py", line 160, in _parse_info
    if len(root.split(os.sep)) == root_path_fregs + 1:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'


@dvm-shlee
Copy link
Member

@gdevenyi tonii_all function is designed to convert multiple Bruker raw data. It may be caused by inputting a single raw directly. Could you try to put your 'raw' into an empty folder and target that parent folder for tonii_all?

@gdevenyi
Copy link
Collaborator Author

gdevenyi commented Jun 2, 2020

Putting raw into a subdirectory test and using tonii_all:

$ brkraw tonii_all test
NoneType: None
Traceback (most recent call last):
  File "/home/gdevenyi/miniforge3/bin/brkraw", line 8, in <module>
    sys.exit(main())
  File "/home/gdevenyi/miniforge3/lib/python3.7/site-packages/brkraw/scripts/brkraw.py", line 157, in main
    raise UnexpectedError
shleeh.errors.UnexpectedError

@dvm-shlee
Copy link
Member

@gdevenyi Thank you for reporting this bug. I found that I made some mistake on the code. The patch will be applied on the next update. Thanks!

dvm-shlee added a commit that referenced this issue Jun 2, 2020
dvm-shlee added a commit that referenced this issue Jun 2, 2020
dvm-shlee added a commit that referenced this issue Jun 2, 2020
dvm-shlee added a commit that referenced this issue Jun 2, 2020
@dvm-shlee
Copy link
Member

@gdevenyi Ok, it will work now from 0.3.3rc6
Please let me know if the issue still exists.
Thank you!

@gdevenyi
Copy link
Collaborator Author

gdevenyi commented Jun 3, 2020

Works now. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants