Skip to content

register_online_lfp can not recognize my motion #2

@David-H-Chang

Description

@David-H-Chang

Hello! In my recent recording, I found register_online_lfp can not recognize my motion (as shown in the screenshot). Even if I used

# spatial filters: second derivative and averageing same-depth channels
lfprec = si.directional_derivative(lfprec, order=2, edge_order=1)

twice in order to further sharpen the border. Is there any parameters I can tuning to get register_online_lfp more sensitive? I guess there is no other problem since my previous recordings worked pretty nice.
Here are my codes:

from dredge.dredge_ap import register
from dredge.dredge_lfp import register_online_lfp
# this has some helpers for plotting
import dredge.motion_util as mu

#me_rigid, extra_info_rigid = register_online_lfp(lfprec, max_disp_um=1000)
#me_rigid.displacement

me, extra_info = register_online_lfp(lfprec, rigid = True, max_disp_um=1000, device=("cuda:0"))
me.displacement
Online chunks [10.0s each]: 100%|██████████| 59/59 [03:39<00:00,  3.72s/it]
array([ 0.        ,  0.        ,  0.        , ..., -0.03255208,
        0.0021134 , -0.04514024], dtype=float32)
vis_start_sample = int(30 * lfprec.sampling_frequency)
vis_length_samples = int(10 * lfprec.sampling_frequency)
fig, ax = plt.subplots(figsize=(8, 8))
im = mu.show_lfp_image(lfprec, vis_start_sample, vis_start_sample + vis_length_samples, ax, microns=True)
#lr = mu.show_lfp_me_traces(me_rigid, vis_start_sample, vis_start_sample + vis_length_samples, ax, color="r")
lr = mu.show_lfp_me_traces(me, vis_start_sample, vis_start_sample + vis_length_samples, ax, color="r")
plt.colorbar(im, ax=ax, shrink=0.3, label="lfp (microvolts)");

1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions