Hi all,
I am using RetroTS.py in a bash terminal to turn respiratory and cardiac tsv.gz files into regressors for 1st level analysis.
I kept getting this error and any suggestion is greatly appreciated!
RetroTS.py
-phys_file sub-test_ses-test_task-reward_recording-cardiac_physio.tsv.gz
-phys_json sub-test_ses-test_task-reward_recording-cardiac_physio.json
-v 2
-n 72
-prefix physio_card_regressors.1D
#output
Traceback (most recent call last):
File “/Users/xiy/abin/RetroTS.py”, line 687, in
retro_ts(
File “/Users/xiy/abin/RetroTS.py”, line 279, in retro_ts
cardiac_peak, error = peak_finder(cardiac_info,v=phys_dat[k])
File “/Users/xiy/abin/lib_RetroTS/PeakFinder.py”, line 517, in peak_finder
r[“p_trace_r”] = interp1d(
File “/Users/xiy/opt/anaconda3/lib/python3.8/site-packages/scipy/interpolate/interpolate.py”, line 467, in init
self._y = self._reshape_yi(self.y)
File “/Users/xiy/opt/anaconda3/lib/python3.8/site-packages/scipy/interpolate/polyint.py”, line 110, in _reshape_yi
** return yi.reshape((yi.shape[0], -1))**
ValueError: cannot reshape array of size 0 into shape (0,newaxis)
I am following the suggestions from this post: https://neurostars.org/t/so-what-are-people-using-to-process-their-bids-physio-files-in-to-regressors-for-fitlins/6698
Same error with respiratory files. Specifying p instead of json file yielded the same error.
Upon inspection, physio files look normal (two columns: timepoints, amplitude).
Please find the linked de-identified physio and json files for error replication.
https://uoregon-my.sharepoint.com/:f:/g/personal/xiy_uoregon_edu/Eu7UYtpzEZxCo8PQpn4g6QYBlYIQxwkbTLz-Qb3Rh-aYrQ?e=uTmkmr
Thank you all!