@@ -81,8 +81,8 @@ void EvntTrigAvg::updateSettings()
8181 clearHistogramArray ();
8282 initializeHistogramArray ();
8383 initializeMinMaxMean ();
84- electrodeMap.clear ();
85- electrodeMap = createElectrodeMap ();
84+ // electrodeMap.clear();
85+ // electrodeMap = createElectrodeMap();
8686 electrodeLabels.clear ();
8787 electrodeLabels = createElectrodeLabels ();
8888 if (spikeData.size ()!=getTotalSpikeChannels ())
@@ -201,7 +201,7 @@ void EvntTrigAvg::handleSpike(const SpikeChannel* spikeInfo, const MidiMessage&
201201 int electrode = getSpikeChannelIndex (newSpike);
202202 // std::cout<<"chanIDX: " << chanIDX << "\n";
203203 int sortedID = newSpike->getSortedID ();
204- // int electrode = electrodeMap[chanIDX ];
204+ // int electrode = electrodeMap[chanInfo ];
205205 if (sortedID!=0 && sortedID>idIndex.size ()){ // respond to new sortedID
206206 idIndex.push_back (spikeData[electrode].size ());// update map of what sorted ID is on what electrode
207207 }
@@ -299,23 +299,25 @@ int EvntTrigAvg::getLastTTLCalculated()
299299}
300300
301301/* * creates map to convert channelIDX to electrode number */
302- std::vector<int > EvntTrigAvg::createElectrodeMap ()
302+ /*
303+ std::map<SourceChannelInfo, int> EvntTrigAvg::createElectrodeMap()
303304{
304- std::vector< int > map;
305+ std::map<SourceChannelInfo, int> map;
305306 int numSpikeChannels = getTotalSpikeChannels();
306307 int electrodeCounter=0;
307308 for (int chanIt = 0 ; chanIt < numSpikeChannels ; chanIt++){
308309 const SpikeChannel* chan = getSpikeChannel(chanIt);
309310 // add to running count of each electrode
310- map. resize (map. size ()+chan-> getNumChannels ());
311+
311312 Array<SourceChannelInfo> chanInfo = chan->getSourceChannelInfo();
312313 for (int subChanIt = 0 ; subChanIt < chan->getNumChannels() ; subChanIt++){
313- map[chanInfo[subChanIt].channelIDX ]=electrodeCounter;
314+
315+ map[chanInfo[subChanIt]]=electrodeCounter;
314316 }
315317 electrodeCounter+=1;
316318 }
317319 return map;
318- }
320+ }*/
319321
320322std::vector<String> EvntTrigAvg::createElectrodeLabels ()
321323{
0 commit comments