AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
May 11, 2021 05:08PM
Hello AFNI team,

I have a problem concerning the use of RetroTS.py:
I managed to convert SCANPHYSLOG data (from Phillips) in BIDS using:
[github.com]
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
Subject Author Posted

RetroTS.py problem using Phillips SCANPHYSLOG

Doughboys May 11, 2021 05:08PM

Re: RetroTS.py problem using Phillips SCANPHYSLOG

Peter Molfese May 12, 2021 12:32PM

Re: RetroTS.py problem using Phillips SCANPHYSLOG

Doughboys May 12, 2021 01:27PM

Re: RetroTS.py problem using Phillips SCANPHYSLOG

Doughboys May 19, 2021 11:58AM

Re: RetroTS.py problem using Phillips SCANPHYSLOG

Peter Molfese May 19, 2021 03:31PM

Re: RetroTS.py problem using Phillips SCANPHYSLOG

rick reynolds May 29, 2021 10:44PM