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

Wrap medicine motion estimation #3552

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

samuelgarcia
Copy link
Member

Hi @nwatters01 @alejoe91 @yger
here the wrapper which also need this PR
jazlab/medicine#2

Comment on lines +49 to +62
if rigid:
# force one bin
num_depth_bins = 1
else:

# we use the spatial window mechanism only to estimate the number one spatial bins
dim = ["x", "y", "z"].index(direction)
contact_depths = recording.get_channel_locations()[:, dim]

deph_range = max(contact_depths) - min(contact_depths)
if win_margin_um is not None:
deph_range = deph_range - 2 * win_margin_um
num_depth_bins = max(int(np.round(deph_range / win_scale_um)), 1)
print("num_depth_bins", num_depth_bins)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nwatters01 this is the main zone where we need to discuss.
I think that windows should come with the probe boundaries +/- margin not by the the spike depth limits.
Otherwise the number of spatial windows will depend on the recording itself and could vary from one recording to another.

@zm711
Copy link
Collaborator

zm711 commented Nov 27, 2024

FYI @samuelgarcia it appears the method is medicine not medecine--> probably better to change files names etc too. see here

Copy link
Member

@alejoe91 alejoe91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medecine -> medicine

from .motion_utils import get_spatial_windows


class MedecineRegistration:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class MedecineRegistration:
class MedicineRegistration:

class MedecineRegistration:
""" """

name = "medecine"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name = "medecine"
name = "medicine"

@@ -11,6 +11,7 @@
from .decentralized import DecentralizedRegistration
from .iterative_template import IterativeTemplateRegistration
from .dredge import DredgeLfpRegistration, DredgeApRegistration
from .medecine import MedecineRegistration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from .medecine import MedecineRegistration
from .medicine import MedicineRegistration

IterativeTemplateRegistration,
DredgeLfpRegistration,
DredgeApRegistration,
MedecineRegistration,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MedecineRegistration,
MedicineRegistration,

@alejoe91 alejoe91 added the motion correction Questions related to motion correction label Nov 28, 2024
@samuelgarcia samuelgarcia changed the title Wrap medecine motion estimation Wrap medicine motion estimation Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
motion correction Questions related to motion correction
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants