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

Missing feature of Clocktool: Sample response/behavior traces at arbitrary behavior/stimulus times #427

Open
ZhuokunDing opened this issue May 24, 2021 · 1 comment · May be fixed by #426

Comments

@ZhuokunDing
Copy link
Contributor

ZhuokunDing commented May 24, 2021

Clocktool at the moment does a great job of interpolating one time series stored in the database to another time series stored in the database. However, sometimes time points of interest may not be readily stored, for example, 1). neural responses at 50 msec after every frame flip, 2). neural response sampled at 30 Hz during a movie presentation. In those cases, it would be really convenient to expose a function, let the user define the time points of interest and sample the response/behavior traces at those given time points.

I tried to implement the function with the existing tools in the clocktool.py and posted it as a draft PR: #426

@ZhuokunDing ZhuokunDing linked a pull request May 24, 2021 that will close this issue
@ZhuokunDing
Copy link
Contributor Author

ZhuokunDing commented Jun 5, 2021

Notes after the discussion with Paul and Cameron:

  1. Compatibility of sync.SyncModel should be added to convert_clock. One will be able to sample the target traces at every stimulus flip time.
  2. There will be one more option in convert_clock that samples the target traces at arbitrary time points defined by a starting time point, a duration, and a sampling frequency. The sampling frequency will be checked to ensure we are unlikely to sample only one time point in a huge NaN gap.
  3. For scans with uneven screen flips, e.g. stimulus.Frame, the recommended way to use clocktool would be to first upsample the responses in stimulus time using the opinion mentioned in 2). Then, apply low-pass filtering of the user's choice. The low pass filtering won't be covered by the clocktool.

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

Successfully merging a pull request may close this issue.

1 participant