예제 #1
0
        private void hPFilterButton_Click(object sender, EventArgs e)
        {
            int threshold = (int)hPFilterNumericUpDown.Value;

            if (hPFilterComboBox.Text == "Гц")
            {
                threshold = (int)(threshold / (360.0 / coef.Count()));
            }

            double[] coefFiltered = Walsh.HPFilter(coef, threshold);

            double[] filteredData = Walsh.TransformReverse(coefFiltered);

            var form = new ShowChartForm(filteredData, name + " ВЧ фильтр", type);

            form.Show();
        }
예제 #2
0
        /// <summary>
        /// Построить по данным график и показать его
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void showBaseSignalButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (data == null)
                {
                    throw new NullReferenceException("Данные не были загруженны!");
                }

                var form = new ShowChartForm(data, dataFileName.Split('/').Last(), type);
                form.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Ошибка!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #3
0
        private void notchFilterButton_Click(object sender, EventArgs e)
        {
            int threshold0 = (int)notchNumericUpDown0.Value;
            int threshold1 = (int)notchNumericUpDown1.Value;

            if (notchComboBox.Text == "Гц")
            {
                threshold0 = (int)(threshold0 / (360.0 / coef.Count()));
                threshold1 = (int)(threshold1 / (360.0 / coef.Count()));
            }

            double[] coefFiltered = Walsh.NotchFilter(coef, threshold0, threshold1);

            double[] filteredData = Walsh.TransformReverse(coefFiltered);

            var form = new ShowChartForm(filteredData, name + " режекторный фильтр", type);

            form.Show();
        }