Closed BAshinoff closed 6 months ago
Hi Brandon, thanks for reaching out. This error happens because it's not possible to run spin tests on volumes (e.g. MNI152 maps). Spin tests are the version of spatial null where the cortical surface is projected to a sphere and spun, but this requires that your data exists on a cortical surface, which isn't the case for volumetric data. You have some options:
burt2018
, burt2020
, or moran
nulls. These work for volumetric data however they come at a large computational expense for volumetric images.Hope that helps!
Justine
Thanks Justine for the quick response!
This is extremely helpful, as was the workshop you ran that's on youtube!
Description of issue
Hi,
First, thank you for such a great toolbox! I am running into an issue and was hoping to get some advice.
I have written some python code that I'm running in a jupyter notebook to compare 'tmap' to all maps in the annotations by looping through the annotations.
For the code I am sharing below, I am using aghorian2017 as 'tmap' as a stand-in for a map I have which is also in MNI 152 space.
First, I take the tmap and resample it into the space/density of the annotation from the current loop, then I generate null models based on the resampled t-map, then I calculate the r and p values.
Below the code, I have included a screen shot of the error code I get that there is a problem identifying the 'sphere' variable in the alexander_bloch function. I have also included a screen shot of the alexander_bloch function that seems to fail. This only seems to happen though for iterations where the annotation is in MNI152 space, which matches tmap.
Just to note, I realize in this example it's crashing on the annotation that is identical to the tmap, but this happens for any annotation that starts in MNI152 space, but the code works with no issues for any annotation that starts in any of the other spaces.
Any advice to fix this error is appreciated.
Cheers, Brandon
Code of Conduct
neuromaps
Code of Conduct