History of AFNI updates  

|
May 16, 2021 06:04AM
Dear AFNI developers and users,

I am trying to run RetroTS.py on the BIDS-formatted phys files from this open dataset: [legacy.openfmri.org]

This is my input:
(base) daniel@daniel-VivoBook-ASUSLaptop-X530FN-S530FN:~$ RetroTS.py -phys_file '/media/daniel/77669C5017CBE0AE/ds000030_R1.0.5/sub-10171/func/sub-10171_task-rest_physio.tsv.gz' \
-phys_json '/media/daniel/77669C5017CBE0AE/ds000030_R1.0.5/sub-10171/func/sub-10171_task-rest_physio.json' \
-prefix prova_regressione.1D -n 34 -v 2

This is the output on the terminal:

[  7.403  14.519  17.486  68.533  69.501  71.471  72.508 105.442 115.262
 133.236 147.586 157.272 158.341 159.346 168.321 171.323 204.116 212.257
 224.815 235.713 254.724 273.607 294.784]
Traceback (most recent call last):
  File "/home/daniel/abin/RetroTS.py", line 700, in <module>
    phys_json=opt_dict["-phys_json"]
  File "/home/daniel/abin/RetroTS.py", line 294, in retro_ts
    main_info["resp_peak"] = respiration_peak
UnboundLocalError: local variable 'respiration_peak' referenced before assignment

The tsv file looks like this

55.2458190918	98.1654427442	-8.59014299629	56.5339485236	-0.00387859479518
55.2471923828	98.1654427442	-8.59314602988	56.5339485236	-0.00387859479518
55.2430725098	98.0966750419	-8.59915209707	56.5148740835	-0.00387859479518
55.2252197266	98.1138669674	-8.59314602988	56.5339485236	-0.0014945254138
55.2307128906	98.1052710047	-8.59765058027	56.5148740835	-0.00387859479518
55.2348327637	98.1052710047	-8.60065361387	56.5339485236	-0.0014945254138
55.2334594727	98.1912306326	-8.59164451309	56.5339485236	-0.0014945254138
55.2389526367	98.1396548558	-8.59464754668	56.5148740835	-0.00626266417656
....

While the json looks like this

{
    "Units": [
        "Volts", 
        "%O2 saturation", 
        "Pulse", 
        "BPM", 
        "Status"
    ], 
    "SamplingFrequency": 1000.0, 
    "Columns": [
        "respiration", 
        "O2_saturation", 
        "pulse", 
        "cardiac", 
        "O2_status"
    ], 
    "StartTime": 0.0
}

I updated AFNI two days ago, the OS is Linux Mint.

What could I do to solve the error and obtain the regression files?

Thank you,

Daniel
Subject Author Posted

RetroTS UnboundLocalError: local variable 'respiration_peak'

drusso May 16, 2021 06:04AM