Exemplo n.º 1
0
        public NeuropixelsV1DataFrame(NeuropixelsV1DataBlock dataBlock, double acq_clk_hz, double data_clk_hz)
        {
            SpikeFrameClock = GetClock(dataBlock.SpikeDataClock);
            LFPFrameClock   = GetClock(dataBlock.LFPDataClock);

            SpikeDataClock = GetClock(dataBlock.SpikeDataClock);
            LFPDataClock   = GetClock(dataBlock.LFPDataClock);

            SpikeData = GetEphysData(dataBlock.SpikeData);
            LFPData   = GetEphysData(dataBlock.LFPData);

            FrameCounter = GetCounter(dataBlock.CounterData);
            FrameType    = GetFrameType(dataBlock.FrameType);

            FrameClockHz = acq_clk_hz;
            DataClockHz  = data_clk_hz;
        }
Exemplo n.º 2
0
        public override IObservable <NeuropixelsV1DataFrame> Process(IObservable <oni.Frame> source)
        {
            // Configure probe
            var probe = new NeuropixelsV1Probe(Controller, DeviceIndex.SelectedIndex);

            probe.WriteConfiguration(Configuration, PerformReadCheck);

            var data_block = new NeuropixelsV1DataBlock(BlockSize);

            return(source
                   .Where(f => f.DeviceIndex() == DeviceIndex.SelectedIndex)
                   .Where(f =>
            {
                return data_block.FillFromFrame(f);
            })
                   .Select(f =>
            {
                var sample = new NeuropixelsV1DataFrame(data_block, FrameClockHz, DataClockHz);
                data_block = new NeuropixelsV1DataBlock(BlockSize);
                return sample;
            }));
        }