Use samples2times in axon_abf reader to handle gaps#87
Conversation
Updated `ndr.reader.axon_abf.readchannels_epochsamples` to use `samples2times` for converting sample indices to time, ensuring correct handling of recordings with gaps (e.g., sweeps). Added special handling for the 'time' channel to avoid infinite recursion.
|
👋 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. |
…yntax Updated `ndr.reader.axon_abf.readchannels_epochsamples` to use `samples2times` for converting sample indices to time, ensuring correct handling of recordings with gaps (e.g., sweeps). Added special handling for the 'time' channel to avoid infinite recursion. Additionally, removed unnecessary commas and semicolons throughout `ndr/reader/axon_abf.m` to reduce code warnings and improve readability.
This change modifies
readchannels_epochsamplesinndr.reader.axon_abfto use thesamples2timesmethod of theaxon_abfobject instead of assuming a constant sampling rate and linear time. This is critical for ABF files with gaps between sweeps.For the 'time' channel itself, the function now retrieves the full time range from the file header and subsets the result, preventing the infinite recursion that would occur if
samples2times(which reads the 'time' channel) were called.The change ensures that data reading respects the actual timing of samples, even when gaps are present.
PR created automatically by Jules for task 12582868174320009274 started by @stevevanhooser