Code Monkey home page Code Monkey logo

Comments (13)

danielemarinazzo avatar danielemarinazzo commented on September 26, 2024

Hi Beth
Thanks a lot for this.
I found this implementation of wavedec, which you can use instead, https://github.com/gnattar/main/blob/master/universal/helper_funcs/wavelettool/wavedec.m.

Also this nice toolbox https://ltfat.github.io should have a similar implementation.

I hope this will work for you!

from rshrf.

bethlloyd avatar bethlloyd commented on September 26, 2024

Hi!

Thank you for your quick response!
Thanks for pointing me to that repository. I went through function by function which needed to be added.

I now get to the following error:


*** File : wavelets.bin not found ! ***

27-Apr-2021 20:05:30 - Failed 'Voxel-wise HRF deconvolution'
Error using wavemngr (line 121)
****** STOP ******
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\wavemngr.m" (???), function "wavemngr" at line 121.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\wavemngr.m" (???), function "wavemngr" at line 424.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\wfilters.m" (???), function "wfilters" at line 40.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\wavedec.m" (???), function "wavedec" at line 36.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\rsHRF_iterative_wiener_deconv.m" (???), function "rsHRF_iterative_wiener_deconv" at line 22.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\rsHRF_deconv_job.m" (???), function "rsHRF_deconv_job" at line 107.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\rsHRF.m" (???), function "rsHRF" at line 113.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\tbx_cfg_rsHRF.m" (???), function "wgr_vox_ROI_rsHRF_conn" at line 884.

The following modules did not run:
Failed: Voxel-wise HRF deconvolution

Is there any chance you know what I could do here... ? It seems its not creating those files specified in wavemngr() function line(98-102).

Thanks again for your help!
Beth

from rshrf.

danielemarinazzo avatar danielemarinazzo commented on September 26, 2024

Dear Beth

it seems to me that the function you added drove you into a rabbit hole of dependencies (wavelet.bin is an initial wavelet that you are supposed to supply).

So what they did here https://github.com/gnattar/main/tree/master/universal/helper_funcs/wavelettool was to reproduce the wavelet toolbox, you can maybe fork that one, and that should be fine.

from rshrf.

bethlloyd avatar bethlloyd commented on September 26, 2024

Dear Daniele,

So sorry to bother you again with this! I did pull the entire folder with its contents (so they are all in the folder C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF)

But I still get the same error (*** File : wavelets.bin not found ! ***)

I get the same error if I try the ROIs-volume batch as well..

Best, Beth

from rshrf.

danielemarinazzo avatar danielemarinazzo commented on September 26, 2024

Dear Beth

is this the repo you pulled https://github.com/gnattar/main/tree/master/universal/helper_funcs/wavelettool ?

Because that one should not require for wavelet.bin.

Maybe if you ran the code without parfor, you should be able to see which function and which line report the error, this would be helpful.

We are anyway working at a version independent of the matlab toolbox, to avoid these issues in the future.

from rshrf.

guorongwu avatar guorongwu commented on September 26, 2024

from rshrf.

guorongwu avatar guorongwu commented on September 26, 2024

@bethlloyd can you try to download this toolbox, and add it (/Examples/wavelet/wavelet) into the path
https://github.com/prvn16/ManavMantra/tree/master/Examples/wavelet/wavelet

from rshrf.

bethlloyd avatar bethlloyd commented on September 26, 2024

thanks @guorongwu!

I tried running it with the toolbox in the path, however I get the error that you need a license number to use wavelet toolbox.

What I then tried is just taking the files:
'wavelets.bin'; 'wavelets.ini'; 'wavelets.inf'; 'wavelets.asc'; and putting them in my rsHRF folder.

Now I get the following error:
28-Apr-2021 13:33:50 - Failed 'Voxel-wise HRF deconvolution'
Error using prod
Invalid data type. First argument must be numeric or logical.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\wmemutil.m" (???), function "wmemutil" at line 40.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\wavemngr.m" (???), function "wavemngr" at line 425.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\wfilters.m" (???), function "wfilters" at line 40.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\wavedec.m" (???), function "wavedec" at line 36.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\rsHRF_iterative_wiener_deconv.m" (???), function "rsHRF_iterative_wiener_deconv" at line 22.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\rsHRF_deconv_job.m" (???), function "rsHRF_deconv_job" at line 107.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\rsHRF.m" (???), function "rsHRF" at line 113.
In file "C:\Users\lloydb\surfdrive\ExperimentData\toolbox\spm12\spm12\toolbox\rsHRF\tbx_cfg_rsHRF.m" (???), function "wgr_vox_ROI_rsHRF_conn" at line 884.

The following modules did not run:
Failed: Voxel-wise HRF deconvolution

thanks again for your help

from rshrf.

bethlloyd avatar bethlloyd commented on September 26, 2024

Hi!

So I realised that the student version of Matlab does not come with the wevelet toolbox, but other 'regular' versions do.
I will access another Matlab with the wavelet toolbox and it should run then!

Thanks for your help :)

Best, Beth

from rshrf.

danielemarinazzo avatar danielemarinazzo commented on September 26, 2024

That's great, hopefully it will work for you, but thanks for pointing that out for us.
We are currently striving to make the toolbox accessible to anyone, students in this case.
Luckily the python version is already 😉

from rshrf.

bethlloyd avatar bethlloyd commented on September 26, 2024

Hi Daniele,

Just to let you know everything is up and working now - thanks!!
I just have a question about collapsing across two sessions that maybe you could give advice on?
I have two 5 minute sessions (150 scans) for each participant and with a threshold of 1, there are on average ~10 'events' per session and participant. I was thinking that it might be better to estimate the HRF based on more events, hence, collapsing across the sessions would equal ~20 events per participant.
What would be the best way to do this? Should I include all the images (300) in the input and concatenate the temporal mask? or would you advise to run them separately and average the output HRFs?

  • Just for some context, I was planning to run a voxel-wise analysis with an ROI mask entered as an explicit mask. (Since I read that it is advisable at the voxel-level when possible, and running the entire brain and then extracting the HRFs will take longer to run). I would do this with the smoothFIR model.

Thank you!
Beth

from rshrf.

danielemarinazzo avatar danielemarinazzo commented on September 26, 2024

Dear Beth

that's great to hear!

The tool is GLM-based, so if you are confident enough that we can consider that the characteristics of the signals in the sessions could be drawn from the same distributions, then it's perfectly safe to concatenate them and have a more robust estimate, and this is a better choice than averaging the HRFs for the two sessions.

Of course you could also be interested in the replicability of the measure and look at the test-retest reliability.

Good luck!

from rshrf.

danielemarinazzo avatar danielemarinazzo commented on September 26, 2024

I am closing this issue since the technical problem is solved, but of course feel free to get in touch again, with a separate issue, or on the NITRC forum.

from rshrf.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.