help > Upsampled data
Showing 1-2 of 2 posts
Oct 22, 2015 12:10 PM | Markus Sneve
Upsampled data
Dear Dr. McLaren,
In the release notes for PPPI (v13) there's a comment:
(8) Added the ability to use upsampled data or neural signal inputs
I'm interested in investigating the upsampled (i.e., SPM microtime) PPI terms, but can't find any information (besides the release note comment) if this is possible and, if so, how to implement it?
Thanks again for a great toolbox!
Cheers,
Markus
In the release notes for PPPI (v13) there's a comment:
(8) Added the ability to use upsampled data or neural signal inputs
I'm interested in investigating the upsampled (i.e., SPM microtime) PPI terms, but can't find any information (besides the release note comment) if this is possible and, if so, how to implement it?
Thanks again for a great toolbox!
Cheers,
Markus
Oct 22, 2015 02:10 PM | Donald McLaren
RE: Upsampled data
Markus,
The upsampled data/neural inputs was added to allow users to use non-BOLD sources and pre-computed estimates of neural activity for the input to the interaction. This was done for 2 reasons: (1) Allowing pre-computed estimates of the neural activity may potentially speed up the computation process if one can estimate the neural activity of each seed region outside of the PPI computations; and (2) as BOLD only gives you an estimate of the neural activity, one might want to use an alternative source acquired at the same time (e.g. EEG). Additionally, some users have asked if they could use non-neuronal sources for interactions as well (e.g. end-tidal CO2, skin conductance, etc.). These sources are typically acquired at a rate faster than the TR.
For using upsampled data, you need modify the dt field of SPM.xBF.dt to get the correct convolution function. The program can automatically detect the upsampled data because it doesn't match the number of TRs.
How to get upsampled data into the program, you just need to set P.VOI to be a numeric vector with the upsampled data. The program should recognize it is upsampled data and handle it accordingly. If you get an error message:
'VOI is wrong'
Then comment out line 284 in timeseries_extract.m. This should eliminate the error.
Please be aware that I have not fully tested the use of upsampled data as the input into the PPI code.
The PPI terms, themselves are not upsampled. The current version of the script does not save the upsampled/deconvolved neural activity estimates or the upsampled PPI terms. These options would need to be added.
In the interim, you could modify the code to write out the upsampled neural activity and PPI terms. At line ~748, where the psychological variables are saved, you could add the following lines:
PPI.xn=xn;
for cc=1:size(PSYxn,2)
PPI.PPIxn(:,cc)=conv(PSYxn(:,j),hrf);
end
Note: the convolved function is longer than the neural activity and needs to be adjusted.
You will also need to add some code later ~line 910, to save out the PPI variable.
If you already have the upsampled neural activity, it may be easier to to copy the relevant code for creating the PPI terms. The relevant sections would be: lines ~600 to ~650 and ~710 to ~750. You could pull the code out and remove the downsampling elements.
Let me know if you have more questions.
The upsampled data/neural inputs was added to allow users to use non-BOLD sources and pre-computed estimates of neural activity for the input to the interaction. This was done for 2 reasons: (1) Allowing pre-computed estimates of the neural activity may potentially speed up the computation process if one can estimate the neural activity of each seed region outside of the PPI computations; and (2) as BOLD only gives you an estimate of the neural activity, one might want to use an alternative source acquired at the same time (e.g. EEG). Additionally, some users have asked if they could use non-neuronal sources for interactions as well (e.g. end-tidal CO2, skin conductance, etc.). These sources are typically acquired at a rate faster than the TR.
For using upsampled data, you need modify the dt field of SPM.xBF.dt to get the correct convolution function. The program can automatically detect the upsampled data because it doesn't match the number of TRs.
How to get upsampled data into the program, you just need to set P.VOI to be a numeric vector with the upsampled data. The program should recognize it is upsampled data and handle it accordingly. If you get an error message:
'VOI is wrong'
Then comment out line 284 in timeseries_extract.m. This should eliminate the error.
Please be aware that I have not fully tested the use of upsampled data as the input into the PPI code.
The PPI terms, themselves are not upsampled. The current version of the script does not save the upsampled/deconvolved neural activity estimates or the upsampled PPI terms. These options would need to be added.
In the interim, you could modify the code to write out the upsampled neural activity and PPI terms. At line ~748, where the psychological variables are saved, you could add the following lines:
PPI.xn=xn;
for cc=1:size(PSYxn,2)
PPI.PPIxn(:,cc)=conv(PSYxn(:,j),hrf);
end
Note: the convolved function is longer than the neural activity and needs to be adjusted.
You will also need to add some code later ~line 910, to save out the PPI variable.
If you already have the upsampled neural activity, it may be easier to to copy the relevant code for creating the PPI terms. The relevant sections would be: lines ~600 to ~650 and ~710 to ~750. You could pull the code out and remove the downsampling elements.
Let me know if you have more questions.
