Implement samples2times and times2samples for axon_abf#85
Implement samples2times and times2samples for axon_abf#85stevevanhooser merged 9 commits intomainfrom
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
| end; | ||
| end; % daqchannels2internalchannels | ||
|
|
||
| function t = samples2times(axon_abf_obj, channeltype, channel, epochstreams, epoch_select, s) |
Check warning
Code scanning / Code Analyzer
Input argument might be unused. Consider replacing the argument with ~ instead. Warning
| end; | ||
| end; % daqchannels2internalchannels | ||
|
|
||
| function t = samples2times(axon_abf_obj, channeltype, channel, epochstreams, epoch_select, s) |
Check warning
Code scanning / Code Analyzer
Input argument might be unused. Consider replacing the argument with ~ instead. Warning
| t = interp1(s_all, t_all, s, 'linear', 'extrap'); | ||
| end % samples2times | ||
|
|
||
| function s = times2samples(axon_abf_obj, channeltype, channel, epochstreams, epoch_select, t) |
Check warning
Code scanning / Code Analyzer
Input argument might be unused. Consider replacing the argument with ~ instead. Warning
| t = interp1(s_all, t_all, s, 'linear', 'extrap'); | ||
| end % samples2times | ||
|
|
||
| function s = times2samples(axon_abf_obj, channeltype, channel, epochstreams, epoch_select, t) |
Check warning
Code scanning / Code Analyzer
Input argument might be unused. Consider replacing the argument with ~ instead. Warning
Test Results36 tests +2 36 ✅ +2 2s ⏱️ ±0s Results for commit 3a9c3a4. ± Comparison against base commit 3f616e3. This pull request removes 1 and adds 3 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
This change implements custom samples2times and times2samples methods for the ndr.reader.axon_abf class. These methods call readchannels_epochsamples with channel='time' to obtain the full time vector, accounting for potential gaps (sweeps) in the recording, and use interpolation to map between samples and times. A test script tools/tests/test_axon_gaps.m has been added for verification.
PR created automatically by Jules for task 2438793150761745814 started by @stevevanhooser