Beispiel #1
0
        private void intervalMenuItem_Click(object sender, System.EventArgs e)
        {
            EarLab.Dialogs.Analysis.IntervalDialog intervalDialog = new EarLab.Dialogs.Analysis.IntervalDialog();

            if (intervalDialog.ShowDialog(this) == DialogResult.OK)
            {
                LayoutScatter.BoxDataType boxData = this.layoutScatter.BoxData;
                double[,] analysisArray = Analysis.SpikeAnalysis.IntervalAnalysis(boxData.spikeArray, intervalDialog.MaxInterval, intervalDialog.BinCount, boxData.timeStart, boxData.timeEnd, boxData.cellIDStart, boxData.cellIDEnd);

                double[] axisArray = new double[6];
                axisArray[0] = boxData.cellIDStart;
                axisArray[1] = boxData.cellIDEnd;
                axisArray[2] = 0.0;
                axisArray[3] = intervalDialog.MaxInterval;

                double min, max;
                this.GetMinMax(analysisArray, out min, out max);
                axisArray[4] = min;
                axisArray[5] = max;

                string[] axisNames = new string[4];
                axisNames[0] = "Interval Analysis";
                axisNames[1] = "Cell ID";
                axisNames[2] = "Interval (Sec)";
                axisNames[3] = "Bin count";

                EarLab.Dialogs.AnalysisDialogNew analysisDialog = new EarLab.Dialogs.AnalysisDialogNew(analysisArray, axisArray, axisNames);
                analysisDialog.ShowDialog(this);
            }
        }
Beispiel #2
0
        private void postMenuItem_Click(object sender, System.EventArgs e)
        {
            EarLab.Dialogs.Analysis.PostDialog postDialog = new EarLab.Dialogs.Analysis.PostDialog(this.layoutScatter.BoxData.timeEnd - this.layoutScatter.BoxData.timeStart);

            if (postDialog.ShowDialog(this) == DialogResult.OK)
            {
                LayoutScatter.BoxDataType boxData = this.layoutScatter.BoxData;
                double[,] analysisArray = Analysis.SpikeAnalysis.PostStimulusAnalysis(boxData.spikeArray, postDialog.BinWidth, boxData.timeStart, boxData.timeEnd, boxData.cellIDStart, boxData.cellIDEnd);

                double[] axisArray = new double[6];
                axisArray[0] = boxData.cellIDStart;
                axisArray[1] = boxData.cellIDEnd;
                axisArray[2] = boxData.timeStart;
                axisArray[3] = boxData.timeEnd;

                double min, max;
                this.GetMinMax(analysisArray, out min, out max);
                axisArray[4] = min;
                axisArray[5] = max;

                string[] axisNames = new string[4];
                axisNames[0] = "Post Stimulus Analysis";

                EarLab.Dialogs.AnalysisDialogNew analysisDialog = new EarLab.Dialogs.AnalysisDialogNew(analysisArray, axisArray, axisNames);
                analysisDialog.ShowDialog(this);
            }
        }