open-discussion > PESTICa in CONN
Showing 1-5 of 5 posts
Feb 16, 2016 08:02 PM | Eduardo A Garza Villarreal
PESTICa in CONN
Hi
I want to use the PESTICA cardio and respiratory output for CONN as covariates within-subjects. For this I have use either 1D MAT or TXT files with the cardiac and respiratory fluctuations at volumec level, and PESTICA I assume outputs at slice level.
Which files should I use for this and is there any of them in Volumes and not slices? In my case each volume has 36 slices.
Thank you
Kind regards
Eduardo
I want to use the PESTICA cardio and respiratory output for CONN as covariates within-subjects. For this I have use either 1D MAT or TXT files with the cardiac and respiratory fluctuations at volumec level, and PESTICA I assume outputs at slice level.
Which files should I use for this and is there any of them in Volumes and not slices? In my case each volume has 36 slices.
Thank you
Kind regards
Eduardo
Feb 16, 2016 10:02 PM | Eduardo A Garza Villarreal
RE: PESTICa in CONN
Hi
Well, so far I think the files I can use are "card_pestica.dat" and "resp_pestica.dat" and I'm making a small script for Matlab in this way:
card_pestica=dlmread('card_pestica.dat')
volume = 36
card_pestica_vol = arrayfun(@(i) max(card_pestica(i:i+volume-1)),1:volume:length(card_pestica)-volume+1);
card_pestica_vol = reshape(card_pestica_vol,[300,1])
With that I get a 1D file with 300 rows (volumes) and the MAX for each volume.
Please confirm using the volume MAX is alright, or should I use the MEAN?
Thank you
Eduardo
Well, so far I think the files I can use are "card_pestica.dat" and "resp_pestica.dat" and I'm making a small script for Matlab in this way:
card_pestica=dlmread('card_pestica.dat')
volume = 36
card_pestica_vol = arrayfun(@(i) max(card_pestica(i:i+volume-1)),1:volume:length(card_pestica)-volume+1);
card_pestica_vol = reshape(card_pestica_vol,[300,1])
save('card_pestica_vol.mat')
and
dlmwrite('card_pestica_vol.txt',card_pestica_vol)
With that I get a 1D file with 300 rows (volumes) and the MAX for each volume.
Please confirm using the volume MAX is alright, or should I use the MEAN?
Thank you
Eduardo
Feb 17, 2016 02:02 PM | Wanyong Shin - Cleveland Clinic Founcatoin
RE: PESTICa in CONN
Hi, Eduardo
I do not understand your functions, but I think I can give you a general information of PESTICA, which would answer partially for your question.
Pestica generates card_pestica.dat and resp_pestica.dat files, which are vectors with a length of slice number x volume (measurement). These files has temporal resolution of TR/slice #. For example, if you have 100 measures of fMRI with 30 slices and TR of 2s, xxx_pestica.dat is sampled every 0.067s. Note that real measure of PMU has commonly 1/50 or 1/200 temporal resolution (1/sec). You can treat xxx_pestica data with different temporal resolution or sampling rate, in the similar way that you use PMU data.
Since TR of fMRI is relatively large (~2s) to be compared to a cycle of card.(~1s) and resp. (~5s), representative or mean pmu data for each volume might not be good idea. If you'd like to do slice-timing correction before PMU data correction, you might pick the first slice timing data in each volume. However, keep in mind that the phase of PMU or PESTICA data is calculated first then, assumed N order of sine/cosine model using the calculated phase (see retroicor payer by Glover), the signal is regressed out.
Hope it helps.
-Wanyong
I do not understand your functions, but I think I can give you a general information of PESTICA, which would answer partially for your question.
Pestica generates card_pestica.dat and resp_pestica.dat files, which are vectors with a length of slice number x volume (measurement). These files has temporal resolution of TR/slice #. For example, if you have 100 measures of fMRI with 30 slices and TR of 2s, xxx_pestica.dat is sampled every 0.067s. Note that real measure of PMU has commonly 1/50 or 1/200 temporal resolution (1/sec). You can treat xxx_pestica data with different temporal resolution or sampling rate, in the similar way that you use PMU data.
Since TR of fMRI is relatively large (~2s) to be compared to a cycle of card.(~1s) and resp. (~5s), representative or mean pmu data for each volume might not be good idea. If you'd like to do slice-timing correction before PMU data correction, you might pick the first slice timing data in each volume. However, keep in mind that the phase of PMU or PESTICA data is calculated first then, assumed N order of sine/cosine model using the calculated phase (see retroicor payer by Glover), the signal is regressed out.
Hope it helps.
-Wanyong
Feb 17, 2016 03:02 PM | Eduardo A Garza Villarreal
RE: PESTICa in CONN
Hi Wanyong,
Thanks for the answer, it did clarify more.
The functions I used are in matlab. In general what I did what just to load the card_pestica.dat file (with 10,800 rows or slices), then for each 36 slices I extracted the MAX value to represent volume PMU and wrote that into an array file of 300 rows (volumes)
What I usually do (aka the correct way) is to run SLOMOCO + PESTICA and use those resulting 4D brains. However, in this case my team is using CONN Toolbox for SPM. CONN is configurable but not so friendly when you want to change things. Therefore, I wanted to run everything in CONN and add the physiological data from PESTICA as if they were acquired in the scanner (nuisance regression). That way, CONN would run smoothly.
This is why I'm trying to find out the best way to do this. So, then my xxx_pestica.dat files are 0.56s.
In this sense, it is not enough to change the sampling rate to 2s. I'm looking at the CONN forums and it seems I could use RETROICOR regressors if I can extract them.
I'll see how that goes
Thanks
Eduardo
Thanks for the answer, it did clarify more.
The functions I used are in matlab. In general what I did what just to load the card_pestica.dat file (with 10,800 rows or slices), then for each 36 slices I extracted the MAX value to represent volume PMU and wrote that into an array file of 300 rows (volumes)
What I usually do (aka the correct way) is to run SLOMOCO + PESTICA and use those resulting 4D brains. However, in this case my team is using CONN Toolbox for SPM. CONN is configurable but not so friendly when you want to change things. Therefore, I wanted to run everything in CONN and add the physiological data from PESTICA as if they were acquired in the scanner (nuisance regression). That way, CONN would run smoothly.
This is why I'm trying to find out the best way to do this. So, then my xxx_pestica.dat files are 0.56s.
In this sense, it is not enough to change the sampling rate to 2s. I'm looking at the CONN forums and it seems I could use RETROICOR regressors if I can extract them.
I'll see how that goes
Thanks
Eduardo
Oct 20, 2016 03:10 PM | Helene Veenstra
RE: PESTICa in CONN
Hi Eduardo and others!
I am very curious how this approach turned out for you, as I am in the same position, wanting to use PESTICA in the CONN toolbox.
Hope someone can shed some more light on this!
Helene
Originally posted by Eduardo A Garza Villarreal:
I am very curious how this approach turned out for you, as I am in the same position, wanting to use PESTICA in the CONN toolbox.
Hope someone can shed some more light on this!
Helene
Originally posted by Eduardo A Garza Villarreal:
Hi Wanyong,
Thanks for the answer, it did clarify more.
The functions I used are in matlab. In general what I did what just to load the card_pestica.dat file (with 10,800 rows or slices), then for each 36 slices I extracted the MAX value to represent volume PMU and wrote that into an array file of 300 rows (volumes)
What I usually do (aka the correct way) is to run SLOMOCO + PESTICA and use those resulting 4D brains. However, in this case my team is using CONN Toolbox for SPM. CONN is configurable but not so friendly when you want to change things. Therefore, I wanted to run everything in CONN and add the physiological data from PESTICA as if they were acquired in the scanner (nuisance regression). That way, CONN would run smoothly.
This is why I'm trying to find out the best way to do this. So, then my xxx_pestica.dat files are 0.56s.
In this sense, it is not enough to change the sampling rate to 2s. I'm looking at the CONN forums and it seems I could use RETROICOR regressors if I can extract them.
I'll see how that goes
Thanks
Eduardo
Thanks for the answer, it did clarify more.
The functions I used are in matlab. In general what I did what just to load the card_pestica.dat file (with 10,800 rows or slices), then for each 36 slices I extracted the MAX value to represent volume PMU and wrote that into an array file of 300 rows (volumes)
What I usually do (aka the correct way) is to run SLOMOCO + PESTICA and use those resulting 4D brains. However, in this case my team is using CONN Toolbox for SPM. CONN is configurable but not so friendly when you want to change things. Therefore, I wanted to run everything in CONN and add the physiological data from PESTICA as if they were acquired in the scanner (nuisance regression). That way, CONN would run smoothly.
This is why I'm trying to find out the best way to do this. So, then my xxx_pestica.dat files are 0.56s.
In this sense, it is not enough to change the sampling rate to 2s. I'm looking at the CONN forums and it seems I could use RETROICOR regressors if I can extract them.
I'll see how that goes
Thanks
Eduardo