From d983615076610b66ff9e6b154c5273fc503f9bcc Mon Sep 17 00:00:00 2001 From: glopesdev Date: Thu, 23 May 2024 09:24:12 +0100 Subject: [PATCH] Rename copy transpose method for clarity --- OpenEphys.Onix/OpenEphys.Onix/AnalogInput.cs | 2 +- OpenEphys.Onix/OpenEphys.Onix/BufferHelper.cs | 2 +- OpenEphys.Onix/OpenEphys.Onix/Rhd2164Data.cs | 4 ++-- OpenEphys.Onix/OpenEphys.Onix/Test0Data.cs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenEphys.Onix/OpenEphys.Onix/AnalogInput.cs b/OpenEphys.Onix/OpenEphys.Onix/AnalogInput.cs index ecd4cb59..e0e03345 100644 --- a/OpenEphys.Onix/OpenEphys.Onix/AnalogInput.cs +++ b/OpenEphys.Onix/OpenEphys.Onix/AnalogInput.cs @@ -61,7 +61,7 @@ public unsafe override IObservable Generate() clockBuffer[sampleIndex] = frame.Clock; if (++sampleIndex >= bufferSize) { - var analogData = BufferHelper.CopyBuffer( + var analogData = BufferHelper.CopyTranspose( analogDataBuffer, bufferSize, AnalogIO.ChannelCount, diff --git a/OpenEphys.Onix/OpenEphys.Onix/BufferHelper.cs b/OpenEphys.Onix/OpenEphys.Onix/BufferHelper.cs index ae0999e8..9eaf1eea 100644 --- a/OpenEphys.Onix/OpenEphys.Onix/BufferHelper.cs +++ b/OpenEphys.Onix/OpenEphys.Onix/BufferHelper.cs @@ -4,7 +4,7 @@ namespace OpenEphys.Onix { static class BufferHelper { - public static Mat CopyBuffer( + public static Mat CopyTranspose( TBuffer[] buffer, int sampleCount, int channelCount, diff --git a/OpenEphys.Onix/OpenEphys.Onix/Rhd2164Data.cs b/OpenEphys.Onix/OpenEphys.Onix/Rhd2164Data.cs index 99d925a4..f37a7f7a 100644 --- a/OpenEphys.Onix/OpenEphys.Onix/Rhd2164Data.cs +++ b/OpenEphys.Onix/OpenEphys.Onix/Rhd2164Data.cs @@ -41,8 +41,8 @@ public unsafe override IObservable Generate() clockBuffer[sampleIndex] = frame.Clock; if (++sampleIndex >= bufferSize) { - var amplifierData = BufferHelper.CopyBuffer(amplifierBuffer, bufferSize, Rhd2164.AmplifierChannelCount, Depth.U16); - var auxData = BufferHelper.CopyBuffer(auxBuffer, bufferSize, Rhd2164.AuxChannelCount, Depth.U16); + var amplifierData = BufferHelper.CopyTranspose(amplifierBuffer, bufferSize, Rhd2164.AmplifierChannelCount, Depth.U16); + var auxData = BufferHelper.CopyTranspose(auxBuffer, bufferSize, Rhd2164.AuxChannelCount, Depth.U16); observer.OnNext(new Rhd2164DataFrame(clockBuffer, hubClockBuffer, amplifierData, auxData)); hubClockBuffer = new ulong[bufferSize]; clockBuffer = new ulong[bufferSize]; diff --git a/OpenEphys.Onix/OpenEphys.Onix/Test0Data.cs b/OpenEphys.Onix/OpenEphys.Onix/Test0Data.cs index c9ca48e9..a552e69c 100644 --- a/OpenEphys.Onix/OpenEphys.Onix/Test0Data.cs +++ b/OpenEphys.Onix/OpenEphys.Onix/Test0Data.cs @@ -49,8 +49,8 @@ public unsafe override IObservable Generate() clockBuffer[sampleIndex] = frame.Clock; if (++sampleIndex >= bufferSize) { - var dummy = BufferHelper.CopyBuffer(dummyBuffer, bufferSize, dummyWords, Depth.S16); - var message = BufferHelper.CopyBuffer(messageBuffer, bufferSize, 1, Depth.S16); + var dummy = BufferHelper.CopyTranspose(dummyBuffer, bufferSize, dummyWords, Depth.S16); + var message = BufferHelper.CopyTranspose(messageBuffer, bufferSize, 1, Depth.S16); observer.OnNext(new Test0DataFrame(clockBuffer, hubClockBuffer, message, dummy)); hubClockBuffer = new ulong[bufferSize]; clockBuffer = new ulong[bufferSize];