-
Notifications
You must be signed in to change notification settings - Fork 189
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
Add correct_inter_session_displacement
function
#3126
base: main
Are you sure you want to change the base?
Add correct_inter_session_displacement
function
#3126
Conversation
bf9a84c
to
58a6962
Compare
99431b5
to
8e6e77b
Compare
correct_inter_session_displacement
function
9c8f81a
to
1d3d8db
Compare
e7c22dc
to
8ec328c
Compare
debugging/session_alignment.py
Outdated
"bin_um" : number of spatial histogram bins. As the estimated peak | ||
locations are continuous (i.e. real numbers) this is not constrained | ||
by the number of channels. | ||
"method" : may be "chunked_mean", "chunked_median", "chunked_supremum", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing "entire_session"
debugging/session_alignment.py
Outdated
motion_info_list : list[dict] | ||
A list of `motion_info` objects, as output from `correct_motion`. | ||
Each entry should correspond to a recording in `recording_list`. | ||
rigid: bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this
debugging/session_alignment.py
Outdated
an InterpolateMotionRecording` recording, the corrected | ||
output recording will be a copy of the input recording with | ||
the additional displacement correction added. | ||
`motion_objects_list : list[Motion] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is wrong now
…eads to empty regions.
…en make a huge difference.
2c1ebca
to
74d6c45
Compare
This PR requires #3231 , on which it is rebased.
This draft PR starts to play around with a rough implementation of 'inter-session displacement' estimation / correction, as discussed #2626.
The problem to be solved is inter-session movement ('displacement') of the probe. This is very similar problem to the inter-session motion correction, and can use many of the same tools. The idea is accept as input a list of recording objects (and, optionally, a list of intra-session motion correction outputs). For each session, an activity histogram will be generated, and then the inter-session drift and necessary correction estimated. The correction is then applied to the recording object, but a
displacement_info
object (similar tomotion_info
object) will be output. This could be used to correct peaks directly and optionally later, correct templates (see #2626).At first I'll just do a very straightforward, rough implementation, then work on improving it. The steps are:
motion_info
dicts (output from intra-session motion correction). Ifmotion_info
is not passed, peaks and peak locations will be estimated. (to improve: here just use the entire reocrding, but in future can use subsets of the recording, in a way that maximises the accuracy of the estimation).motion_info
is provided, update the drift estimates with the inter-session drift and return. Otherwise, make the recordingsInterpolateMotionRecording
and return. Optionally return thedisplacement_info
which copiesmotion_info
.This is currently very-rough draft PR but of course welcome feedback!
TODO:
spikeinterface/src/spikeinterface/generation/drift_tools.py
Line 4 in 0e13973
FUTURE: