@@ -54,11 +54,14 @@ void SourceSimThread::registerParameters()
54
54
settings.channelsPerProbe = 384 ;
55
55
settings.numNIDAQ = 1 ;
56
56
settings.channelsPerNIDAQ = 16 ;
57
+ settings.probeType = true ;
57
58
58
59
addIntParameter (Parameter::PROCESSOR_SCOPE, " clk_hz" , " Clock Frequency" , " Clock Frequency" , settings.clkFreq , 1 , 10000 , false );
59
60
60
61
addIntParameter (Parameter::PROCESSOR_SCOPE, " npx_chans" , " NPX Chans" , " Number of channels per probe" , settings.channelsPerProbe , 1 , 10000 , true );
61
62
63
+ addBooleanParameter (Parameter::PROCESSOR_SCOPE, " npx_type" , " NPX Type" , " Toggle Neuropixels probe type (1.0 = true, 2.0 = false)" , true , true );
64
+
62
65
addIntParameter (Parameter::PROCESSOR_SCOPE, " npx_probes" , " NPX Probes" , " Number of probes" , settings.numProbes , 0 , 20 , true );
63
66
64
67
addIntParameter (Parameter::PROCESSOR_SCOPE, " nidaq_chans" , " NIDAQ Chans" , " Number of channels per device" , settings.channelsPerNIDAQ , 1 , 32 , true );
@@ -84,7 +87,7 @@ void SourceSimThread::updateSettings (OwnedArray<ContinuousChannel>* continuousC
84
87
sources.clear ();
85
88
86
89
std::vector<std::string> probeNames = {
87
- " A" , " B" , " C" , " D" , " E" , " F" , " G" , " H" , " I" , " J" , " K" , " L" , " M" , " N" , " O" , " P" , " Q" , " R" , " S" , " T" , " U" , " V" , " W" , " X" , " Y" , " Z"
90
+ " A" , " B" , " C" , " D" , " E" , " F" , " G" , " H" , " I" , " J" , " K" , " L" , " M" , " N" , " O" , " P" , " Q" , " R" , " S" , " T" , " U" , " V" , " W" , " X" , " Y" , " Z" , " AA " , " BB " , " CC " , " DD " , " EE " , " FF "
88
91
};
89
92
90
93
for (int i = 0 ; i < settings.numProbes ; i++)
@@ -137,44 +140,48 @@ void SourceSimThread::updateSettings (OwnedArray<ContinuousChannel>* continuousC
137
140
138
141
// std::cout << "Probe " << i << " LFP; " << settings.channelsPerProbe << " channels." << std::endl;
139
142
140
- DataStream::Settings lfpSettings {
141
- lfpBandName,
142
- " Neural data sampled @ 2.5kHz " ,
143
- " SP" + String (i) + " _LFP" ,
144
- 2500 .0f
145
- };
146
-
147
- dataStreams->add (new DataStream (lfpSettings));
148
- sources.add (new SimulatedSource (lfpBandName, settings.channelsPerProbe , 2500.0 , SimulatedSourceType::LFP_BAND));
149
- sourceBuffers.add (new DataBuffer (settings.channelsPerProbe , 48000 ));
150
- sources.getLast ()->buffer = sourceBuffers.getLast ();
151
-
152
- for (int j = 0 ; j < settings.channelsPerProbe ; j++)
143
+ if (settings.probeType ) // NP 1.0 = true
153
144
{
154
- ContinuousChannel::Settings channelSettings {
155
- ContinuousChannel::Type::ELECTRODE,
156
- " CH" + String (j + 1 ),
157
- " LFP voltage from electrode " + String (j + 1 ),
158
- " source" ,
159
- 0 .195f , // BITVOLTS VALUE
145
+ DataStream::Settings lfpSettings {
146
+ lfpBandName,
147
+ " Neural data sampled @ 2.5kHz " ,
148
+ " SP" + String (i) + " _LFP" ,
149
+ 2500 .0f
150
+ };
151
+
152
+ dataStreams->add (new DataStream (lfpSettings));
153
+ sources.add (new SimulatedSource (lfpBandName, settings.channelsPerProbe , 2500.0 , SimulatedSourceType::LFP_BAND));
154
+ sourceBuffers.add (new DataBuffer (settings.channelsPerProbe , 48000 ));
155
+ sources.getLast ()->buffer = sourceBuffers.getLast ();
156
+
157
+ for (int j = 0 ; j < settings.channelsPerProbe ; j++)
158
+ {
159
+ ContinuousChannel::Settings channelSettings {
160
+ ContinuousChannel::Type::ELECTRODE,
161
+ " CH" + String (j + 1 ),
162
+ " LFP voltage from electrode " + String (j + 1 ),
163
+ " source" ,
164
+ 0 .195f , // BITVOLTS VALUE
165
+ dataStreams->getLast ()
166
+ };
167
+
168
+ continuousChannels->add (new ContinuousChannel (channelSettings));
169
+ }
170
+
171
+ EventChannel* lfpSyncLine;
172
+
173
+ EventChannel::Settings lfpSyncSettings {
174
+ EventChannel::Type::TTL,
175
+ " LFP Sync Line" ,
176
+ " Synchronization signal from the LFP band of simulated probe " + String (i),
177
+ " probe.sync" ,
160
178
dataStreams->getLast ()
161
179
};
162
180
163
- continuousChannels->add (new ContinuousChannel (channelSettings));
181
+ lfpSyncLine = new EventChannel (lfpSyncSettings);
182
+ eventChannels->add (lfpSyncLine);
164
183
}
165
184
166
- EventChannel* lfpSyncLine;
167
-
168
- EventChannel::Settings lfpSyncSettings {
169
- EventChannel::Type::TTL,
170
- " LFP Sync Line" ,
171
- " Synchronization signal from the LFP band of simulated probe " + String (i),
172
- " probe.sync" ,
173
- dataStreams->getLast ()
174
- };
175
-
176
- lfpSyncLine = new EventChannel (lfpSyncSettings);
177
- eventChannels->add (lfpSyncLine);
178
185
}
179
186
180
187
for (int i = 0 ; i < settings.numNIDAQ ; i++)
@@ -242,6 +249,10 @@ void SourceSimThread::parameterValueChanged (Parameter* param)
242
249
{
243
250
settings.numProbes = ((IntParameter*) param)->getIntValue ();
244
251
}
252
+ else if (param->getName ().equalsIgnoreCase (" npx_type" ))
253
+ {
254
+ settings.probeType = ((BooleanParameter*) param)->getBoolValue ();
255
+ }
245
256
else if (param->getName ().equalsIgnoreCase (" nidaq_chans" ))
246
257
{
247
258
settings.channelsPerNIDAQ = ((IntParameter*) param)->getIntValue ();
0 commit comments