compneuro-da / rsHRF

rsHRF: A Toolbox for Resting State HRF Deconvolution and Connectivity Analysis (MATLAB)
BSD 3-Clause "New" or "Revised" License
48 stars 15 forks source link

Some questions about rsHRF toolbox #62

Open Masharipov opened 1 week ago

Masharipov commented 1 week ago

Dear experts,

First of all, thanks for your usefull toolbox!

I want to check how rsHRF estimate HRF parameters based on my large-scale neural mass simulations. I have simulated neuronal time series which I'm going to convolve with variable HRFs based on two gamma functions. I'm plan to randomly vary 5 parameters of these gamma functions *( - see below)**. Next, I want to compare the ground truth double gamma parameters with estimated parameters obtained by rsHRF.

My questions:

1) Is there any way to get these 5 parameters for double gamma function using rsHRF? As far as I understand I cant use rsHRF GUI for this purpose. When I select "Basis functions = Gamma" and "Number of basis functions = 2", I can get only betas (beta_hrf) for two basis functions and parameters for these two gamma functions are fixed. I suppose that I can get the estimated HRFs (hrfa) and then paramatrize them by fitting to double gamma and get 5 parameters of interest.

2) Is it possible to get a deconvolved time series for each voxel? When I select voxel analysis rsHRF doesn't save "deconv_FILE_NAME.mat" file (all "Save" options are set to "Yes"). It only saves "deconv_FILE_NAME.nii" file which doesn't contain the deconvolved time series (it is a single 3-D *nii file, not 4-D file). I can get deconvolved time series ("deconv_FILE_NAME.mat" file) only when I select ROI-volume analysis.

3) Based on your experience, which is better for voxel analysis: unsmoothed or smoothed data?

============================================================== *()** Double gamma: image

Parameters of interest: alpha1, alpha2, beta1, beta2, c

Cf. with p(1:5) parameters from spm_hrf:

alpha1 = p(1)/p(3) beta1 = dt/p(3) alpha2 = p(2)/p(4) beta2 = dt/p(4) c = 1/p(3)

where p(1) - delay of response (relative to onset)
p(2) - delay of undershoot (relative to onset)
p(3) - dispersion of response
p(4) - dispersion of undershoot
p(5) - ratio of response to undershoot

==============================================================

Thank you in advance

Ruslan

guorongwu commented 6 days ago

Dear experts,

First of all, thanks for your usefull toolbox!

I want to check how rsHRF estimate HRF parameters based on my large-scale neural mass simulations. I have simulated neuronal time series which I'm going to convolve with variable HRFs based on two gamma functions. I'm plan to randomly vary 5 parameters of these gamma functions *( - see below)**. Next, I want to compare the ground truth double gamma parameters with estimated parameters obtained by rsHRF.

My questions:

  1. Is there any way to get these 5 parameters for double gamma function using rsHRF? As far as I understand I cant use rsHRF GUI for this purpose. When I select "Basis functions = Gamma" and "Number of basis functions = 2", I can get only betas (beta_hrf) for two basis functions and parameters for these two gamma functions are fixed. I suppose that I can get the estimated HRFs (hrfa) and then paramatrize them by fitting to double gamma and get 5 parameters of interest.

yes, you need to fit the model in order to obtain the parameters.

  1. Is it possible to get a deconvolved time series for each voxel? When I select voxel analysis rsHRF doesn't save "deconv_FILE_NAME.mat" file (all "Save" options are set to "Yes"). It only saves "deconv_FILE_NAME.nii" file which doesn't contain the deconvolved time series (it is a single 3-D *nii file, not 4-D file). I can get deconvolved time series ("deconv_FILE_NAME.mat" file) only when I select ROI-volume analysis.

deconv_FILE_NAME.nii is the deconvolved time series, regardless of whether it is a 3D or 4D file.

  1. Based on your experience, which is better for voxel analysis: unsmoothed or smoothed data?

not sure, but you can try analyzing the unsmoothed data first and then smoothing the results before conducting statistical analysis.

============================================================== *()** Double gamma: image

Parameters of interest: alpha1, alpha2, beta1, beta2, c

Cf. with p(1:5) parameters from spm_hrf:

alpha1 = p(1)/p(3) beta1 = dt/p(3) alpha2 = p(2)/p(4) beta2 = dt/p(4) c = 1/p(3)

where p(1) - delay of response (relative to onset) p(2) - delay of undershoot (relative to onset) p(3) - dispersion of response p(4) - dispersion of undershoot p(5) - ratio of response to undershoot

==============================================================

Thank you in advance

Ruslan

Masharipov commented 6 days ago

Thanks for the quick reply!

deconv_FILE_NAME.nii is the deconvolved time series, regardless of whether it is a 3D or 4D file.

Sorry, I don't quite understand. deconv_FILE_NAME.nii is a single image (single time point), not the time series. Time series should be multiple 3D files or single 4D file.