Hello AFNI team,
I have a problem concerning the use of RetroTS.py:
I managed to convert SCANPHYSLOG data (from Phillips) in BIDS using:
https://github.com/lukassnoek/scanphyslog2bids
If anyone knows a better way?
I tried to run the command:
/abin/RetroTS.py -phys_file SCANPHYSLOG20210420091530.tsv.gz \
-v 1 -n 600 -prefix physio_regressors.1D -phys_json SCANPHYSLOG20210420091530.json
my .json looks like:
{
"SamplingFrequency": 496,
"StartTime": -78.74798387096774,
"Columns": [
"cardiac",
"respiratory",
"trigger"
]
}
SCANPHYSLOG20210420091530.tsv.gz looks like:
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1921 0
1 -1864 0
1 -1864 0
1 -1864 0
1 -1864 0
1 -1864 0
1 -1864 0
1 -1864 0
1 -1864 0
1 -1864 0
1 -1864 0
1 -1921 0
1 -1921 0
1 -1921 0
....
cardiac is not varying since I do not have the data (so it stayed 1)
respiratory is varying
I have got 600 triggers (1) that do correspond to the 600 volumes (or slices)
When running the command I have got:
pause
[]
Traceback (most recent call last):
File "/home/cgarin/abin/RetroTS.py", line 647, in <module>
phys_json=opt_dict["-phys_json"]
File "/home/cgarin/abin/RetroTS.py", line 245, in retro_ts
cardiac_peak, error = peak_finder(cardiac_info, v=phys_dat[k])
File "/home/cgarin/abin/lib_RetroTS/PeakFinder.py", line 521, in peak_finder
bounds_error=False,
File "/home/cgarin/anaconda3/lib/python3.7/site-packages/scipy/interpolate/interpolate.py", line 468, in __init__
self._y = self._reshape_yi(self.y)
File "/home/cgarin/anaconda3/lib/python3.7/site-packages/scipy/interpolate/polyint.py", line 111, in _reshape_yi
return yi.reshape((yi.shape[0], -1))
ValueError: cannot reshape array of size 0 into shape (0,newaxis)
Any idea of what is going on?
Thank you very much for your help!!
Clem