Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhysIO on Octave #251

Open
stepantikhomirov opened this issue Nov 20, 2023 · 3 comments
Open

PhysIO on Octave #251

stepantikhomirov opened this issue Nov 20, 2023 · 3 comments
Assignees
Labels
physio Issues related to PhysIO Toolbox

Comments

@stepantikhomirov
Copy link

stepantikhomirov commented Nov 20, 2023

Hi experts,
I faced a problem using PhysIO tollbox on Octave. I have BIDS tsv physio files and i want to run them in PhysIO. I managed to open SPM in Octave and add Physio toolbox. So first of all, I tried to run spm_job.m file

config_script = '/zi/home/stepan.tikhomirov/Downloads/tapas-master/examples_v5.0.0/PhysIO/BIDS/PPU3T/bids_ppu3t_spm_job.m';
run(config_script);

spm_jobman('run', matlabbatch);

but I got this error


20-Nov-2023 16:24:21 - Running job #1

20-Nov-2023 16:24:21 - Running 'TAPAS PhysIO Toolbox'
20-Nov-2023 16:24:21 - Failed 'TAPAS PhysIO Toolbox'
'fields' undefined near line 99, column 32
In file "/zi/home/stepan.tikhomirov/Documents/Tapas physio/tapas-master/PhysIO/code/utils/tapas_physio_update_from_job.m" (???), function "tapas_physio_update_from_job" at line 99.
In file "/zi/home/stepan.tikhomirov/Documents/Tapas physio/tapas-master/PhysIO/code/utils/tapas_physio_job2physio.m" (???), function "tapas_physio_job2physio" at line 34.
In file "/zi/home/stepan.tikhomirov/Documents/Tapas physio/tapas-master/PhysIO/code/tapas_physio_cfg_matlabbatch.m" (???), function "tapas_physio_cfg_matlabbatch>run_physio" at line 1659.

The following modules did not run:
Failed: TAPAS PhysIO Toolbox

fatal: caught signal Segmentation fault -- stopping myself...
/zi/apps/common/bin/sci/octave/7.3.0/bin/octave: line 3: 2137705 Segmentation fault (core dumped) singularity exec /zi/apps/common/container/sci/octave/octave_7.3.0.sif octave "$@"
"""
And I don' really understand the cause of this error. The problem is in undefined "fields" in tapas_physio_update_from_job function, though everything worked properly in Matlab.

After that I decided to run bids_ppu3t_matlab_script.m file. When I run it I get
"""
tapas_physio_main_create_regressors at line 58 column 15
bids_ppu3t_matlab_script at line 64 column 8
run at line 78 column 7
"""
That is actually the problem
"if isdeployed || ismcc
tapas_physio_splash();
pause(2); % wait to read
end
"
I tried to remove this part of the script, but faced another issue then.
So, do you know how to run .m files using physio Toolbox on Octave? Is physIO compatible with Octave?
Thank you in advance,
Stepan.

@ImreKertesz ImreKertesz added the physio Issues related to PhysIO Toolbox label Nov 20, 2023
@mrikasper mrikasper self-assigned this Nov 20, 2023
@mrikasper
Copy link
Member

Dear Stepan,

Thank you for trying out PhysIO. Unfortunately, we have never tested compatibility with Octave explicitly. I presume there might be some missing functions from Matlab Toolboxes (signal processing etc.), but your error seems to be more generic. fields, as used in tapas_physio_update_from_job is an undocumented Matlab function, probably not ported to Octave.

In general, there are several ways forward here - depending on whether full compatibility with Octave or just running PhysIO without Matlab is your goal.

  1. I am planning to attend Brainhack Global 2023. If there is interest for pushing Octave Compatibility, we could work on that in this context.
  2. We already have a precompiled version of PhysIO on Neurodesk. It's not the very latest version, but should have most of the features, and I am planning to update Neurodesk as part of the next release as well.
  3. Alternatively, PhysIO is now also part of CBRAIN, see this publication, which has a nice webinterface, but also enables using PhysIO on a high-performance computing cluster.

All the best,
Lars

@stepantikhomirov
Copy link
Author

Thank you, Lars. I would like to ask you one more question. When I run bids_ppu3t_matlab_script.m script (on Mstlsb) which does not require spm, then I get this error

Error: File: tapas_physio_read_physlogfiles_bids.m Line: 501 Column: 1
The function "plot_interpolation" was closed with an 'end', but at least one other function definition was not. To avoid confusion
when using nested functions, it is illegal to use both conventions in the same file.

Error in tapas_physio_read_physlogfiles (line 64)
tapas_physio_read_physlogfiles_bids(log_files, cardiac_modality, verbose);

Error in tapas_physio_main_create_regressors (line 135)
verbose] = tapas_physio_read_physlogfiles(...

Error in bids_ppu3t_matlab_script (line 64)
physio = tapas_physio_main_create_regressors(physio);

Error in run (line 91)
evalin('caller', strcat(script, ';'));

I have not found the cause of this error. Do you have suggestions?
Thank you, Stepan

@mrikasper
Copy link
Member

Dear Stepan,

which version of PhysIO are you using (tapas_physio_version)? In the latest commit of master, development and physio branch here in the repository, it seems that the previous function in that file (tapas_physio_read_physlogfiles_bids) was correctly closed with an end.

Maybe you can also attach the version of the file (tapas_physio_read_physlogfiles_bids.m) you are using here, so that I can check whether it's the most current one.

All the best,
Lars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physio Issues related to PhysIO Toolbox
Projects
None yet
Development

No branches or pull requests

3 participants