Exemplo n.º 1
0
        public void scan_graphSet(ScanData _scanData)
        {
            this.zgc_Profile.GraphPane.CurveList.Clear();
            this.zgc_Profile.GraphPane.XAxis.Title.Text = "ステージ座標";

            Tuple<double, double> peakPosCount;

            this.zgc_Profile.GraphPane.Title.IsVisible = false;

            #region 明視野
            if (this.radioButton_Setting_BrightField.Checked)
            {
                //ピーク位置計算
                peakPosCount = ScanData.PeakPosCount(_scanData.Position.ToArray(), _scanData.CountND.ToArray());
                //暗視野計測の場合
                //グラフにデータを追加 (強度と微分値)
                LineItem lineDif = this.zgc_Profile.GraphPane.AddCurve("Differential", _scanData.Position.ToArray(), _scanData.CountND.ToArray(), Color.Red);
                LineItem lineIntensity = this.zgc_Profile.GraphPane.AddCurve("Intensity", _scanData.Position.ToArray(), _scanData.CountNT.ToArray(), Color.Purple);
                lineIntensity.IsY2Axis = true;

                this.zgc_Profile.GraphPane.YAxis.Title.Text = "Differential";
                this.zgc_Profile.GraphPane.YAxis.Type = AxisType.Linear;

                this.zgc_Profile.GraphPane.Y2Axis.Title.Text = "Intensity";
                this.zgc_Profile.GraphPane.Y2Axis.IsVisible = true;
                if (this.GraphLog)
                    this.zgc_Profile.GraphPane.YAxis.Type = AxisType.Log;
                else
                    this.zgc_Profile.GraphPane.YAxis.Type = AxisType.Linear;

                //FWHM計算表示
                Tuple<double, double> FWHM = scan.minusPeak? _scanData.FWHM_NDmin : _scanData.FWHM_ND;
                Tuple<double, double> FWHM2 = scan.minusPeak ? _scanData.FWHM_ND2min : _scanData.FWHM_ND2;
                BeginInvoke((Action)(() =>
                {
                    this.textBox_FWHM1.Text = FWHM.Item1.ToString("F0");
                    this.textBox_FWHM2.Text = FWHM.Item2.ToString("F0");
                    this.textBox_FWHM1_2.Text = FWHM2.Item1.ToString("F0");
                    this.textBox_FWHM2_2.Text = FWHM2.Item2.ToString("F0");
                    this.toolStripStatusLabel_FWHM1.Text = "FWHM1: " + FWHM.Item1.ToString("F0") + " [nm] |";
                    this.toolStripStatusLabel_FWHM2.Text = "FWHM2: " + FWHM.Item2.ToString("F0") + " [nm] |";

                }));

            }
            #endregion

            #region 暗視野
            else
            {
                //ピーク位置計算
                peakPosCount = ScanData.PeakPosCount(_scanData.Position.ToArray(), _scanData.CountNT.ToArray());
                //明視野計測の場合
                //グラフにデータを追加 (強度のみ)
                LineItem lineIntensity = this.zgc_Profile.GraphPane.AddCurve("Intensity", _scanData.Position.ToArray(), _scanData.CountNT.ToArray(), Color.Purple);
                double[] back_x = new double[] { _scanData.Position[0], _scanData.Position[_scanData.iScanCount-1] };
                double[] back_y = new double[] { _scanData.bg, _scanData.bg };
                LineItem lineBack = this.zgc_Profile.GraphPane.AddCurve("Background", back_x, back_y, Color.Green, SymbolType.None);
                
                this.zgc_Profile.GraphPane.YAxis.Title.Text = "Intensity";
                if (this.GraphLog)
                    this.zgc_Profile.GraphPane.YAxis.Type = AxisType.Log;
                else
                    this.zgc_Profile.GraphPane.YAxis.Type = AxisType.Linear;
                this.zgc_Profile.GraphPane.Y2Axis.IsVisible = false;
                
                //FWHM計算表示
                Tuple<double, double> FWHM = _scanData.FWHM_NT;
                BeginInvoke((Action)(() =>
                {
                    this.textBox_FWHM1.Text = FWHM.Item1.ToString("F0");
                    this.textBox_FWHM2.Text = FWHM.Item2.ToString("F0");
                    this.textBox_FWHM1_2.Text = "N/A";
                    this.textBox_FWHM2_2.Text = "N/A";
                    this.toolStripStatusLabel_FWHM1.Text = "FWHM1: " + FWHM.Item1.ToString("F0") + " [nm] |";
                    this.toolStripStatusLabel_FWHM2.Text = "FWHM2: " + FWHM.Item2.ToString("F0") + " [nm] |";
                }));
            }
            #endregion
            
            //ピーク位置を格納
            PeakX = (int)peakPosCount.Item1;

            //選択したファイルの描画
            if (graphFilePath != null)
                GraphFromFile(graphFilePath, peakPosCount.Item1, peakPosCount.Item2);

            this.zgc_Profile.GraphPane.YAxis.Type = this.GraphLog ? AxisType.Log : AxisType.Linear;
            this.zgc_Profile.GraphPane.AxisChange();
            BeginInvoke((Action)(() =>
            {
                this.toolStripProgressBar_ScanNum.Value = (int)(_scanData.iScanCount / (double)scan.iScanMax);
                this.toolStripStatusLabel_PeakX.Text = "ピーク位置: " + PeakX.ToString("F0") + " [nm] |";
                this.toolStripStatusLabel_ScanNum.Text = "スキャン: " + _scanData.iScanCount.ToString() + "/" + scan.iScanMax.ToString() + " 回 |";

                this.zgc_Profile.Refresh();
            }));
        }
Exemplo n.º 2
0
 public ScanDataEventArgs(ScanData scanData)
 {
     this.scanData = scanData;
 }
Exemplo n.º 3
0
 internal void setGraph(ScanData _scanData)
 {
     graphSetEvent(_scanData);
 }
Exemplo n.º 4
0
 protected virtual void graphSetEvent(ScanData _scanData)
 {
     if (_scanData != null)
         graphSet(_scanData);
 }
Exemplo n.º 5
0
        public void Initialize(Class_FeedbackStage _fs, int _Axis, VmeControl _vme,
                    int _EH, int _ChIn, int _ChOut,
                    int _iScanStart, int _iScanPitch, int _iScanMax,int _iNoPt,
                    double _dExposTime, double _dWaitTime,
                    string _filePath, ScanField _scanField, string _strComment = "")
        {
            fs = _fs;
            Axis = _Axis;
            vme = _vme;
            EH = _EH;
            ChIn = _ChIn;
            ChOut = _ChOut;

            iScanStart = _iScanStart;
            iScanPitch = _iScanPitch;
            iScanMax = _iScanMax;
            iNoPt = _iNoPt;

            dExposTime = _dExposTime;
            dWaitTime = _dWaitTime;

            filePath = _filePath;

            scanField = _scanField;

            strComment = _strComment;

            scanData = new ScanData(dExposTime);

            flagFinish = false;
        }