From c1636328194f71dcb3d694e0b1bd08055418299a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 25 Nov 2025 18:13:31 +0000 Subject: [PATCH] Add documentation note on manual sampling rate calculations Created docs/notes/samplingRateNotes.md listing locations in reader subclasses where manual sample-to-time conversion is performed. No code changes were made. --- docs/notes/samplingRateNotes.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docs/notes/samplingRateNotes.md diff --git a/docs/notes/samplingRateNotes.md b/docs/notes/samplingRateNotes.md new file mode 100644 index 0000000..674c990 --- /dev/null +++ b/docs/notes/samplingRateNotes.md @@ -0,0 +1,10 @@ +# Sampling Rate Manual Calculation Notes + +The following locations in the code perform manual sample-to-time or time-to-sample conversions assuming a constant sampling rate and no gaps. These should eventually be migrated to use `ndr.time.fun.samples2times` or `ndr.reader.base.samples2times`. + +| Class | Method | Line Number | Code Snippet | +|---|---|---|---| +| `ndr.reader.ced_smr` | `readchannels_epochsamples` | 91 | `t0 = (s0-1)/sr;` | +| `ndr.reader.intan_rhd` | `t0_t1` | 156 | `total_time = total_samples / header.frequency_parameters.amplifier_sample_rate;` | +| `ndr.reader.intan_rhd` | `readchannels_epochsamples` | 288 | `t0 = (s0-1)/sr;` | +| `ndr.reader.spikegadgets_rec` | `t0_t1` | 169 | `total_time = (total_samples - 1) / str2num(fileconfig.samplingRate);` |