Hi, Philipp-
Thanks for that explanation.
When you refer to the Scaefer-Yeo dataset, I guess that means that atlas (ROI map of regions), right? That is different than a template.
But the main point is you want to use this ROI information with the errts file (or more specifically autocorrelation derived from errts file) information? Can you please check that your Resample_Yeo7N_1000ribbon.nii and errts* datasets are on the same grid, using the "3dinfo -same_all_grid .." information?
Also, I don't see why you want to get coordinate information from Resample_Yeo7N_1000ribbon.nii and replace that information from the earlier 1D files. If the errts data are not on the same grid as the Resample*ribbon.nii file, then it should not be used to replace coordinates. If those two files are on the same grid, then replacing coordinates is unnecessary and might just lead to a scripting issue. Actually, I don't see how Resample_Yeo7N_1000ribbon.nii is used at all here.
--pt