cbinyu / bidsphysio

Converts physio data to BIDS physiological recording
MIT License
12 stars 9 forks source link

PMU files from version XA30 #8

Open alexsayal opened 2 years ago

alexsayal commented 2 years ago

Hello all,

Our MRI console software was recently updated to XA30. This led us to use ideacmdtool to record physiological signals, which are generated in .pmu, .puls, .ecg, and .resp formats.

I tried using the pmu2bidsphysio function to process them, but I get the following error:

Warning: File 'PL01R1AP.puls' does not seem to be a valid VB15A PMU file: Expected: 'not 5002'; got: '5002 [...]'
Traceback (most recent call last):
  File "/home/alexandresayal/miniconda3/bin/pmu2bidsphysio", line 8, in <module>
    sys.exit(main())
  File "/home/alexandresayal/miniconda3/lib/python3.8/site-packages/bidsphysio/pmu2bids/pmu2bidsphysio.py", line 620, in main
    physio_data = pmu2bids(args.infiles, verbose=args.verbose)
  File "/home/alexandresayal/miniconda3/lib/python3.8/site-packages/bidsphysio/pmu2bids/pmu2bidsphysio.py", line 120, in pmu2bids
    physio_type, MDHTime, sampling_rate, physio_signal = readpmu(f, verbose=verbose)
  File "/home/alexandresayal/miniconda3/lib/python3.8/site-packages/bidsphysio/pmu2bids/pmu2bidsphysio.py", line 203, in readpmu
    return readVE11Cpmu(physio_file)
  File "/home/alexandresayal/miniconda3/lib/python3.8/site-packages/bidsphysio/pmu2bids/pmu2bidsphysio.py", line 301, in readVE11Cpmu
    physio_signal = parserawPMUsignal(raw_signal)
  File "/home/alexandresayal/miniconda3/lib/python3.8/site-packages/bidsphysio/pmu2bids/pmu2bidsphysio.py", line 545, in parserawPMUsignal
    signal = [int(v) for v in signal]
  File "/home/alexandresayal/miniconda3/lib/python3.8/site-packages/bidsphysio/pmu2bids/pmu2bidsphysio.py", line 545, in <listcomp>
    signal = [int(v) for v in signal]
ValueError: invalid literal for int() with base 10: ''

I deduce that the files have somehow changed in this version and hence are not compatible. I attach these files.

PL01R1AP.zip

I thank you in advance for any help you can provide regarding this problem.

All the best,

pvelasco commented 2 years ago

Hi @alexsayal,

I'm troubleshooting the error you found. Thanks for sending a sample dataset, but I'm finding the dataset shorter than expected based on the timing in the files. Did you delete a bunch of values to make the files smaller? That would explain the discrepancy...

Thanks,

-Pablo

alexsayal commented 2 years ago

Hi @pvelasco,

Sorry for that, the files I sent are cut at around 5 minutes due to the lack of a ECG signal (a limitation of the ideacmdtool on the new XA30 version that we only now acknowledged). I re-send some complete files.

PhysioFiles.zip

Thank you,

alexsayal commented 1 year ago

Hi @pvelasco ,

Any news regarding this update?

Thank you in advance for this

alexsayal commented 1 year ago

One important difference between these files and the ones by VE11 is that multiple regions of 5002 ... 6002 exist, as explained here - https://gitlab.ethz.ch/physio/physio-doc/-/wikis/MANUAL_PART_READIN#updates-logversion-3

alexsayal commented 1 year ago

I have now made a suggestion in #9