Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing shape of the searchlight #531

Open
AntoineBouyeure opened this issue Oct 2, 2023 · 2 comments
Open

Changing shape of the searchlight #531

AntoineBouyeure opened this issue Oct 2, 2023 · 2 comments

Comments

@AntoineBouyeure
Copy link

AntoineBouyeure commented Oct 2, 2023

Hello,

I would like to change the shape of the searchlight to a cube (which is the default shape of classbrainiak.searchlight.searchlight.Searchlight that is used in the tutorials) to a sphere/ball. I can import a searchlight ball as classbrainiak.searchlight.searchlight.Ball, but I am not sure of what to do next. Specifiying shape in the form of sl = Searchlight(shape=Ball) or sl = Searchlight and then Searchlight.shape=Ball doesnt work. I can't also run directly searchlight with the brainiak.searchlight.searchlight.Ball object.

What should I do to change the shape of the searchlight? I'm sorry if the answer is kind of obvious...

@lcnature
Copy link
Contributor

lcnature commented Oct 2, 2023

Hi,
Try this?

from brainiak.searchlight.searchlight import Ball, Searchlight
sl = Searchlight(shape=Ball)

@AntoineBouyeure
Copy link
Author

AntoineBouyeure commented Oct 2, 2023

Hi, thanks for your answer! Unfortunately when doing something like sl = Searchlight(sl_rad=5, shape=Ball), the resulting searchlight images are empty. And trying sl = Searchlight(shape=Ball(rad=5)) produces TypeError: 'Ball' object is not callable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants