sng-newy / eigenstrapping Goto Github PK
View Code? Open in Web Editor NEWA toolbox for generating spatial null maps using geometric eigenmodes
License: GNU General Public License v3.0
A toolbox for generating spatial null maps using geometric eigenmodes
License: GNU General Public License v3.0
Hi,
thanks for providing this extensive package! I did pip install the python dependencies using the provided requirements.txt, followed by pip installing eigenstrapping. Everything went smoothly but I then got an error while import geometry from eigenstrapping
:
ImportError: cannot import name '_stats' from 'scipy.ndimage.measurements' (/Library/Frameworks/Python.framework/V ersions/3.9/lib/python3.9/site-packages/scipy/ndimage/measurements.py)
What's the issue here? Scipy was successfully installed...
Hi,
Thanks for this awesome tool. I'm following Tutorial 3 to generate my own surrogate maps and I can't determine whether SurfaceEigenstrapping
requires an array or a string:
AttributeError Traceback (most recent call last)
Input In [82], in <module>
1 from eigenstrapping import SurfaceEigenstrapping
----> 2 t = SurfaceEigenstrapping(surface='../tpl-avg_space-canonical_den-1mm_label-hipp_midthickness.surf.gii'
3 ,data='../thickness_midsurf_L_mean.shape.gii', num_modes=200)
File /export03/data/opt/venv/lib/python3.8/site-packages/eigenstrapping/base.py:329, in SurfaceEigenstrapping.__init__(self, data, surface, evals, emodes, num_modes, save_surface, seed, decomp_method, medial, randomize, resample, n_jobs, use_cholmod, permute, add_res, save_rotations, parcellation, normalize)
326 self.surface = load_surface(self.surface_file)
328 self.data = copy.deepcopy(data)
--> 329 self.n_vertices = self.data.shape[0]
331 if emodes is not None and evals is not None:
332 self.evals = evals[:num_modes]
AttributeError: 'str' object has no attribute 'shape'
input files here:
https://github.com/MICA-MNI/hippomaps/blob/master/resources/canonical_surfs/tpl-avg_space-canonical_den-1mm_label-hipp_midthickness.surf.gii
https://github.com/MICA-MNI/hippomaps/blob/master/hippomaps/example_data/thickness_midsurf_L_mean.shape.gii
Thanks!
Hi!
I was following the tutorial and created SurfaceEigenstrapping
class with my data. When I am plotting the eigen.reconstructed_data
it looks much smoother than my original data. Moreover, residuals seem to carry some information. I am using 1000 eigenmodes. Should it be like this? Could you advise what I need to change?
Here is my code
src = mne.setup_source_space(subject, spacing='oct6', subjects_dir=subjects_dir, add_dist=False, n_jobs=10)
vox16_to_vox8 = {ivox:i for i, ivox in enumerate(src[0]['vertno'])}
used_tris_dsmp = [[vox16_to_vox8[tri[0]], vox16_to_vox8[tri[1]], vox16_to_vox8[tri[2]]] for tri in src[0]['use_tris']]
surface=(src[0]['rr'][src[0]['inuse'].astype(bool)].T, used_tris_dsmp)
tria = TriaMesh(surface[0], surface[1])
evals, emodes = calc_eig(tria, 1000, False)
eigen = SurfaceEigenstrapping(
emodes=emodes,
evals=evals,
data=data[:4098],
num_modes=1000,
save_rotations=True,
normalize=False
)
Issue with suppressing all print calls when modules are imported. Stems from eigenstrapping.geometry.blockPrint
being called at line
eigenstrapping/eigenstrapping/geometry.py
Line 28 in a1f735a
main
branch.Priority: Low
Replicable by developers: No
Users involved: One
User has Python kernel panic when importing eigenstrapping
libraries into jupyter notebook. Reinstalling package from local git install caused the issue.
Developer cannot reproduce issue on multiple devices and fresh environments. Suggest this is a one-off error related to user's system.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.