help > Only 1 mean file for 1 subject with 2 sessions
Showing 1-5 of 5 posts
Display:
Results per page:
Sep 4, 2026  11:09 PM | Mary Newsome - University of Utah
Only 1 mean file for 1 subject with 2 sessions

Hi Alfonso and everyone,


We have a Pre-Post design where each subject has 2 sessions. I'm wondering why there is a mean file created for the first session, but not for the second.


During Preprocessing for the second session, I'm getting error messages:  "Mean functional file not found..." and


"/raw_101-2/Resting_State_Analysis_Directory/auswau101-2_restingstate.nii ; run either realignment or ART first, or select the option "first functional
volume as reference" -#coregtomean field- if you prefer to use the first functional volume instead of the mean functional volume as reference)"


Thanks for any help!


Best,


Mary

Oct 10, 2026  04:10 PM | Alfonso Nieto-Castanon - Boston University
RE: Only 1 mean file for 1 subject with 2 sessions

Hi Mary,


The mean functional file is typically (when running the default MNI pipeline and using a single T1 file per subject) created during realignment and it represents the mean of all of the functional data (combined across all runs/sessions). This file is saved in the location of the first run functional data just by convention/simplicity, but it nevertheless does reflect the combined data across all runs, not just across the first run.


If, on the other hand, you are using multiple T1 images in order to accommodate possible anatomical changes in the subjects across runs/sessions, then typically the expectation would be to run preprocessing separately for each run/timepoint. If this was your case, then the error that you report would indicate that preprocessing has been run jointly instead of separately across all runs. Since this is a somewhat common point of confusion I am thinking that perhaps I could add something to the preprocessing pipeline that would allow users to easily run preprocessing separately for each session  (perhaps automaticaly switching to this when the "multiple anatomical scans per subject" option is selected?). In any case, let me know your thoughts and I will update this thread when I have these options ready for testing. 


Also, a quick but likely unrelated note: I noticed that one of your files reported in the error message was named auswau101-2_restingstate.nii, the "auswau" prefix often indicates that data already fully preprocessed (e.g. swau101-2_restingstate.nii, with prefix "swau") will have been used as source of yet a new preprocessing pipeline (hence the new "au" prefixes added). Please double-check and remember to reset your functional and structural tabs to their original states (raw/original data, probably the files "101-2_restingstate.nii" in the example above) before re-running preprocessing. 


Best


Alfonso


Originally posted by Mary Newsome:



Hi Alfonso and everyone,


We have a Pre-Post design where each subject has 2 sessions. I'm wondering why there is a mean file created for the first session, but not for the second.


During Preprocessing for the second session, I'm getting error messages:  "Mean functional file not found..." and


"/raw_101-2/Resting_State_Analysis_Directory/auswau101-2_restingstate.nii ; run either realignment or ART first, or select the option "first functional
volume as reference" -#coregtomean field- if you prefer to use the first functional volume instead of the mean functional volume as reference)"


Thanks for any help!


Best,


Mary



 

Oct 10, 2026  10:10 PM | shayla yonce
RE: Only 1 mean file for 1 subject with 2 sessions

Hi Alfonso, 


 


I think automaticaly switching to this when the "multiple anatomical scans per subject" option is selected would be a great idea! It took me a long time to figure out that I need to run everything separately. 


 


-Shayla Yonce

Oct 11, 2026  12:10 AM | Mary Newsome - University of Utah
RE: Only 1 mean file for 1 subject with 2 sessions

Thank you, Alfonso! I see how having one mean would make sense when all of the runs were collected at the same time and not expected to be different. I had an experience similar to that of Shayla's. For an intervention design, I think both of your ideas would help a lot. (The only thought I had about where to offer the option was what if in the rare occasion that the same T1 had to be used for both sessions for some reason (e.g., corrupted or accidentally not acquired), but then one could always copy the file and have it loaded in for each subject?) 


Also, thanks picking up on that error. Thankfully, we did catch that earlier.


All the best,


Mary

Oct 14, 2026  06:10 PM | Alfonso Nieto-Castanon - Boston University
RE: Only 1 mean file for 1 subject with 2 sessions

Hi Mary & Shayla


I have now uploaded these changes to CONN's development version (this can be downloaded from github.com/alfnie/conn; see or https://web.conn-toolbox.org/resources/c... for details). When entering multiple anatomical files per subject CONN will now automatically force functional preprocessing steps to run separately across runs in order to accommodate possible anatomical differences between runs (so you should be able to run the standard pipelines normally wihtout having to do anything differently). If you have a chance to try out the new functionality please let me know if everything works correctly and/or if you run into any issues.


Best


Alfonso


Originally posted by Mary Newsome:



Thank you, Alfonso! I see how having one mean would make sense when all of the runs were collected at the same time and not expected to be different. I had an experience similar to that of Shayla's. For an intervention design, I think both of your ideas would help a lot. (The only thought I had about where to offer the option was what if in the rare occasion that the same T1 had to be used for both sessions for some reason (e.g., corrupted or accidentally not acquired), but then one could always copy the file and have it loaded in for each subject?) 


Also, thanks picking up on that error. Thankfully, we did catch that earlier.


All the best,


Mary