tag:blogger.com,1999:blog-1405968300258104460.post4882006024448574584..comments2024-03-27T01:18:24.341-04:00Comments on Andy's Brain Blog: What's in an SPM.mat File?Andrew Jahnhttp://www.blogger.com/profile/16435706598096921650noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-1405968300258104460.post-55779431090866939382020-04-22T11:36:26.492-04:002020-04-22T11:36:26.492-04:00Hey there,
Unfortunately, I don't know of any...Hey there,<br /><br />Unfortunately, I don't know of anything that can convert between the two; however, the output from SPM and FSL (i.e., NIFTI) can be read by any other software package. For example, if you wanted to use SPM to do a group-level analysis of the 1st-level output from FSL, you could do so.<br /><br /><br />-AndyAndrew Jahnhttps://www.blogger.com/profile/16435706598096921650noreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-11140842098881192052020-04-07T06:41:46.122-04:002020-04-07T06:41:46.122-04:00Hello Andy, thank you so much for all this informa...Hello Andy, thank you so much for all this information you made accessible for everyone, seriously I cannot thank you enough even for your contributions to my own learning. <br /><br />I am wondering if you know any source code or functionality that can convert between spm.mat and design.fsf files from fsl? Thank you!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-41421482757125032812020-01-11T11:04:51.978-05:002020-01-11T11:04:51.978-05:00Hi Andy - I am trying to extract region informatio...Hi Andy - I am trying to extract region information - say volume, thickness, etc. as numeric measures from each MRI scan. Is that possible from running SPM or cat12? The vendor has provided an overall whole brain volume, hippocampal volume and ventricular volume. Thanks, NusratNRabbeehttps://www.blogger.com/profile/17506329581245697244noreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-60247141620360401652017-09-07T11:30:14.334-04:002017-09-07T11:30:14.334-04:00Hey Marieke,
I don't know where that is in th...Hey Marieke,<br /><br />I don't know where that is in the SPM.mat file (though you could probably find it with a little digging); however, you can get it through the GUI. Click on Review, then Design -> Design Orthogonality. You will see a covariance matrix, with darker colors representing higher correlation between the regressors. If you right click on the design matrix, it will return the correlation matrix numbers to the Matlab command line.<br /><br /><br />Best,<br /><br />-AndyAndrew Jahnhttps://www.blogger.com/profile/16435706598096921650noreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-90422829967181429232017-09-05T09:36:06.193-04:002017-09-05T09:36:06.193-04:00This a a great list!
Do you also know where to fi...This a a great list!<br /><br />Do you also know where to find the information on design orthogonality?<br /><br />Thanks, MariekeAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-40197626170682161152017-08-23T03:21:35.874-04:002017-08-23T03:21:35.874-04:00Hi Anrew,
I done 1st level specification and spm c...Hi Anrew,<br />I done 1st level specification and spm create spm.mat file but estimation did not run. Error is that<br />Running 'Model estimation'<br /><br />SPM12: spm_spm (v6842) 09:31:47 - 23/08/2017<br />========================================================================<br /><br />SPM12: spm_est_non_sphericity (v6827) 09:31:48 - 23/08/2017<br />========================================================================<br />Chunk 2/2 : ...done<br />Failed 'Model estimation'<br />Error using spm_est_non_sphericity (line 208)<br />Please check your data: There are no significant voxels.<br />In file "C:\Users\Taji zewi\Desktop\matlab\spm12\spm12\spm_est_non_sphericity.m" (v6827), function "spm_est_non_sphericity" at line 208.<br />In file "C:\Users\Taji zewi\Desktop\matlab\spm12\spm12\spm_spm.m" (v6842), function "spm_spm" at line 431.<br />In file "C:\Users\Taji zewi\Desktop\matlab\spm12\spm12\config\spm_run_fmri_est.m" (v5809), function "spm_run_fmri_est" at line 33.<br /><br />The following modules did not run:<br />Failed: Model estimation<br /><br /><br />I'm guessing each voxel not same orientation but when try to correction each fmri they comeout .mat file<br />Any suggestions fixing this error?<br />Thank you again for your help<br />-BermalAnonymoushttps://www.blogger.com/profile/08222881737986035071noreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-20981962991770962112017-08-11T11:14:53.019-04:002017-08-11T11:14:53.019-04:00Hi Andy,
I'm using code to design, estimate a...Hi Andy,<br /><br />I'm using code to design, estimate and create contrasts for a matrix that is modified. The batch works perfectly designing and estimating the matrix, but when it comes time to create the contrasts for it, matlab spits out the following error:<br /><br />Error using spm_FcUtil (line 209)<br />not contrast dim. in spm_FcUtil c<br /><br />Error in make_consVC (line 48)<br /> SPMest.xCon =<br /> spm_FcUtil('Set',cname{il},'T','c',cons{il}',SPMest.xX.xKXs);<br /><br />Error in spm_batchTimecourse (line 218)<br /> make_consVC(sub, 1, gwd, blocks, nblocks, nrois, roi_name, TR,<br /> incmoves,timecourseModel, resultsfolder);<br /><br />I'm guessing it's something quite simple to fix, but I don't even know where to begin. Any suggestion would be great.<br /><br />Many thanks Anonymoushttps://www.blogger.com/profile/08261527264499572118noreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-71653982634139775522017-01-26T15:03:25.906-05:002017-01-26T15:03:25.906-05:00Hi Jess,
You can get the location of each voxel (...Hi Jess,<br /><br />You can get the location of each voxel (in MNI coordinates, assuming you've warped to MNI space) by typing xSPM.XYZmm.<br /><br />Unfortunately, I don't know how to extract the fitted time series across all the voxels. I've seen scripts for extracting the PSTH from individual voxels; maybe it can be adapted for your needs: https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind1611&L=spm&P=R92577&1=spm&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4<br /><br />-AndyAndrew Jahnhttps://www.blogger.com/profile/16435706598096921650noreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-9093678729491202982017-01-24T12:28:10.465-05:002017-01-24T12:28:10.465-05:00Hi Andy!
I learnt so much from your blog and its ...Hi Andy! <br />I learnt so much from your blog and its helping my research a lot so thank you!<br />I have another question for you. After my SPM analysis I am ready to see my results by uploading the SPM.mat file. Is there a way to extract the coordinates, the corresponding time series and maybe the fitting model of ALL the activated voxels (after inserting the threshold for the p-value)? I know that I could get the time series by looking at the raw BOLD fMRI signal, but I would like to work with the time series that SPM uses after generating the design matrix and after defining the contrast. If I do plot -> fitted and adjusted response -> define the contrast -> plot against scan or time this plots me what I want for a certain voxel but how do I put this information in a txt file?<br />Thank you again for your help<br />-JessJesshttps://www.blogger.com/profile/10631339844959368361noreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-38347364068506721632016-10-25T10:28:56.607-04:002016-10-25T10:28:56.607-04:00Hey there,
You would need to model them explicitl...Hey there,<br /><br />You would need to model them explicitly, i.e. enter onset times and durations each time there was a fixation. Anything that isn't modeled explicitly is considered part of the implicit baseline.<br /><br />-AndyAndrew Jahnhttps://www.blogger.com/profile/16435706598096921650noreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-1363226930685138082016-10-22T17:18:56.178-04:002016-10-22T17:18:56.178-04:00Hi, I was wondering if this *.mat file also stores...Hi, I was wondering if this *.mat file also stores information on the fixation conditions? I am specifically interested in the onsets and durations of the fiction conditions. If yes, could you point me towards the right fields to access? Right now I can get all the condition names from 'SPM.Sess.U fields and sub-fields but nothing about the fixation conditions. Thanks!TheLoudestOfThemAll@12-04-13https://www.blogger.com/profile/07388934817029268949noreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-51438406952076565682015-04-09T19:10:38.900-04:002015-04-09T19:10:38.900-04:00Hey there,
I haven't done DCM yet, so I can&#...Hey there,<br /><br />I haven't done DCM yet, so I can't say. Possibly sometime in the future, but until then, your best bet is checking the SPM listserv.<br /><br /><br />Best,<br /><br />-AndyAndrew Jahnhttps://www.blogger.com/profile/16435706598096921650noreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-74043253666091068092015-04-05T17:03:40.952-04:002015-04-05T17:03:40.952-04:00Where the time-series sotered in a DCM.mat file s...Where the time-series sotered in a DCM.mat file so that I can fetch it out for other purposes/techniques ? Thank youAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1405968300258104460.post-1520034530456949612015-04-05T16:59:53.284-04:002015-04-05T16:59:53.284-04:00Hi, I want to create a SPM.mat file to create a mo...Hi, I want to create a SPM.mat file to create a model to compare.<br />I have already the time series form a DCM.mat file<br />Thank ypuAnonymousnoreply@blogger.com