History of AFNI updates  

|
April 10, 2023 05:11PM
Hi Paul,

I will try to specifiy what my aim is. I compute the temporal autocorrelation (AC) for each voxel. How do I do that?

1. I extract the voxel-based time-series from the preprocessed AFNI errts. file (aligned to MNI152) using 3dmaskdump into one .1D file per subject.
2. Next, I load this .1D file into Python. I compute the AC for every voxel and save those voxel values in a big list.
3. I take the mean across all subjects for each voxel, also in Python.
----
Now I would like to plot that AC "map" on a 3D surface brain.
----
4. I also loaded the voxel coordinates from a resampled Schaefer-Yeo AFNI template that I build myself. How did I build that file myself? I downloaded the data that you provide here: [afni.nimh.nih.gov] Using that data, I created the 7-networks 1000 parcels version with AFNI myself. This creation is 99% correct, I also plotted the brain in Python, I inspected it in AFNI, all looks perfect. This is the file called "Resample_Yeo7N_1000ribbon.nii" in my previous posts, because I "downsampled" this file to the 3x3x3 mm voxel resolution after I created it, so that it matches the functional resolution.
5. Next, I create a new .1D file using Python. In this file, I save the new information as follows: the first row starts with the first voxel coordinate, that is, it starts with x y and z. Next, the 4th index gets the AC value, such as 4.55 (a single value!). Hence, every row contains 4 numbers, the x y z coordinates plus the AC value.
6. I load this .1D file with 3dUndump to create a new NIfTI file that, in turn, can be loaded back into Python by nilearn, finally allowing to plot this "AC map" on a 3D brain surface.

I should add that the extracted time-series in the first step (1) are already extracted using the different networks, that it, with a for loop for different masks in 3dmaskdump. Hence, the coordinates between those extracted time-series and the template have to be the same, there should be no mismatch, as the previous test showed. However, there is only no mismatch if I mirror the y coordinates in Python by multiplying them with -1.



Edited 4 time(s). Last edit at 04/10/2023 05:30PM by Philipp.
Subject Author Posted

Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump Attachments

Philipp April 10, 2023 07:59AM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump Attachments

Philipp April 10, 2023 08:13AM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

ptaylor April 10, 2023 09:23AM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump Attachments

Philipp April 10, 2023 12:53PM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

ptaylor April 10, 2023 03:18PM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

Philipp April 10, 2023 03:20PM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

Philipp April 10, 2023 03:31PM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

ptaylor April 10, 2023 03:38PM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

Philipp April 10, 2023 03:47PM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

ptaylor April 10, 2023 04:56PM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

Philipp April 10, 2023 05:11PM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

ptaylor April 10, 2023 05:29PM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

Philipp April 10, 2023 05:40PM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

Philipp April 10, 2023 05:47PM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

Philipp April 11, 2023 04:01AM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

ptaylor April 11, 2023 09:54AM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

Philipp April 11, 2023 02:14PM

Re: Extracting voxel-wise data with 3dmaskdump and recombing it with 3dUndump

rick reynolds April 18, 2023 04:12PM