Skip to content

image data from Magnetom XA30 read errors with latest stable and dev versions #56

Description

@mlewis1973

surprisingly this issue exists only for twixtools>=0.24
reads work fine with earlier verisons <=0.23 or gt-twixtools fork, as well as latest mapVBVD with Matlab
(haven't tried pymapvbvd)

read_twix(parse_data=False) correctly returns headers.....
read_twix(parse_data=True) gives unpack error

twix_data = read_twix(filename, verbose=True, parse_data=True)
Software version: VD/VE (!?)

Scan 0
0%| | 0.00/38.1M [00:00<?, ?B/s]unknown magic key: 0x1010000
unknown magic key: 0x1020000
unknown magic key: 0x1030000
unknown magic key: 0x1040000
unknown magic key: 0x1050000
unknown magic key: 0x1060000
unknown magic key: 0x1070000
unknown magic key: 0x1080000
unknown magic key: 0x1ff0000
Traceback (most recent call last):
File "", line 1, in
File "/opt/anaconda3/envs/TWIX2/lib/python3.9/site-packages/twixtools/twixtools.py", line 200, in read_twix
pmu = PMU(out[-1]['mdb'], helpers.get_syngo_version(out[-1]['hdr']))
File "/opt/anaconda3/envs/TWIX2/lib/python3.9/site-packages/twixtools/pmu.py", line 238, in init
block = PMUblockVA(seqdata.data, self.unknown_pmu_magic)
File "/opt/anaconda3/envs/TWIX2/lib/python3.9/site-packages/twixtools/pmu.py", line 142, in init
period, = struct.unpack('I', data[i:i+4])
struct.error: unpack requires a buffer of 4 bytes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions