//Reset SALPA filter private void resetSALPA() { // Set SALPA parameters int asym_sams = Convert.ToInt32(numericUpDown_salpa_asym.Value); int blank_sams = Convert.ToInt32(numericUpDown_salpa_postpeg.Value); int ahead_sams = Convert.ToInt32(numericUpDown_salpa_ahead.Value); //0.0002 = 5 samples @ 25 kHz int forcepeg_sams = Convert.ToInt32(numericUpDown_salpa_forcepeg.Value); SALPA_WIDTH = Convert.ToInt32(numericUpDown_salpa_halfwidth.Value); //if (4 * SALPA_WIDTH + 1 > spikeBufferLength) // Make sure that the number of samples needed for polynomial fit is not more than the current buffersize //{ // double max_halfwidth = Convert.ToDouble((spikeBufferLength - 1) / 4); // SALPA_WIDTH = (int)Math.Floor(max_halfwidth); //} //public SALPA3(int length_sams,int asym_sams,int blank_sams,int ahead_sams, int forcepeg_sams, rawType railLow, rawType railHigh, int numElectrodes, int bufferLength, rawType[] thresh) if (thrSALPA == null) { MessageBox.Show("train salpa before editing parameters"); } else { SALPAFilter = new global::NeuroRighter.Filters.SALPA3(SALPA_WIDTH, asym_sams, blank_sams, ahead_sams, forcepeg_sams, (rawType)(-4 * Math.Pow(10, -3)), (rawType)(4 * Math.Pow(10, -3)), numChannels, spikeBufferLength, thrSALPA); } //SALPAFilter = new SALPA3(SALPA_WIDTH, prepeg, postpeg, postpegzero, (rawType)(-10 / Convert.ToDouble(comboBox_SpikeGain.SelectedItem) + 0.01), // (rawType)(10 / Convert.ToDouble(comboBox_SpikeGain.SelectedItem) - 0.01), numChannels, delta, spikeBufferLength); }
//Reset SALPA filter private void resetSALPA() { // Set SALPA parameters int asym_sams = Convert.ToInt32(numericUpDown_salpa_asym.Value); int blank_sams = Convert.ToInt32(numericUpDown_salpa_postpeg.Value); int ahead_sams = Convert.ToInt32(numericUpDown_salpa_ahead.Value); //0.0002 = 5 samples @ 25 kHz int forcepeg_sams = Convert.ToInt32(numericUpDown_salpa_forcepeg.Value); SALPA_WIDTH = Convert.ToInt32(numericUpDown_salpa_halfwidth.Value); //if (4 * SALPA_WIDTH + 1 > spikeBufferLength) // Make sure that the number of samples needed for polynomial fit is not more than the current buffersize //{ // double max_halfwidth = Convert.ToDouble((spikeBufferLength - 1) / 4); // SALPA_WIDTH = (int)Math.Floor(max_halfwidth); //} //public SALPA3(int length_sams,int asym_sams,int blank_sams,int ahead_sams, int forcepeg_sams, rawType railLow, rawType railHigh, int numElectrodes, int bufferLength, rawType[] thresh) if (thrSALPA == null) MessageBox.Show("train salpa before editing parameters"); else SALPAFilter = new global::NeuroRighter.Filters.SALPA3(SALPA_WIDTH, asym_sams, blank_sams, ahead_sams, forcepeg_sams, (rawType)(-4 * Math.Pow(10, -3)), (rawType)(4 * Math.Pow(10, -3)), numChannels, spikeBufferLength, thrSALPA); //SALPAFilter = new SALPA3(SALPA_WIDTH, prepeg, postpeg, postpegzero, (rawType)(-10 / Convert.ToDouble(comboBox_SpikeGain.SelectedItem) + 0.01), // (rawType)(10 / Convert.ToDouble(comboBox_SpikeGain.SelectedItem) - 0.01), numChannels, delta, spikeBufferLength); }