示例#1
0
        private void CalcAndSaveResult(string pathToSaveFolder)
        {
            for (int n = 0; n < _pathesToFileDUTPattern.Length; n++)
            {
                Curve fileDUTPattern = new Curve(_pathesToFileDUTPattern[n]);
                fileDUTPattern.SetFormatOfPoints("RI");
                fileDUTPattern.AddNewComment("This is de-embedded s2p file");

                string newName = Path.GetFileNameWithoutExtension(_pathesToFileDUTPattern[n]) + "_deembedded" + Path.GetExtension(_pathesToFileDUTPattern[n]);

                switch (_currMethod)
                {
                case "open":
                    OpenMethod(ref fileDUTPattern); break;

                case "l-2l":
                    L2LMethod(ref fileDUTPattern); break;

                case "open-short":
                    OpenShortMethod(ref fileDUTPattern); break;

                case "pad-open-short":
                    PadOpenShortMethod(ref fileDUTPattern); break;
                }

                fileDUTPattern.SaveFile(pathToSaveFolder + "\\" + newName);
            }
        }
示例#2
0
        public void OpenMethodDeEmbedding(string pathToFileOpenPattern, string[] pathesToFileDUTPattern, string pathToSaveFolder)
        {
            _pathesToFileDUTPattern = (string[])pathesToFileDUTPattern.Clone();

            _pathToFileOpenPattern = pathToFileOpenPattern;
            _fileOpenPattern       = new Curve(pathToFileOpenPattern);
            _fileOpenPattern.SetFormatOfPoints("RI");

            _currMethod = "open";

            CalcAndSaveResult(pathToSaveFolder);
        }
        public void PadOpenShortMethodDeEmbedding(string pathToFilePadPattern, string pathToFileOpenPattern, string pathToFileShortPattern, string[] pathesToFileDUTPattern, string pathToSaveFolder)
        {
            _pathesToFileDUTPattern = (string[])pathesToFileDUTPattern.Clone();

            _pathToFilePadPattern = pathToFilePadPattern;
            _pathToFileOpenPattern = pathToFileOpenPattern;
            _pathToFileShortPattern = pathToFileShortPattern;

            _filePadPattern = new Curve(pathToFilePadPattern);
            _fileOpenPattern = new Curve(pathToFileOpenPattern);
            _fileShortPattern = new Curve(pathToFileShortPattern);
            _filePadPattern.SetFormatOfPoints("RI");
            _fileOpenPattern.SetFormatOfPoints("RI");
            _fileShortPattern.SetFormatOfPoints("RI");

            _currMethod = "pad-open-short";

            CalcAndSaveResult(pathToSaveFolder);
        }
        private void CalcAndSaveResult(string pathToSaveFolder)
        {
            for (int n = 0; n < _pathesToFileDUTPattern.Length; n++)
            {
                Curve fileDUTPattern = new Curve(_pathesToFileDUTPattern[n]);
                fileDUTPattern.SetFormatOfPoints("RI");
                fileDUTPattern.AddNewComment("This is de-embedded s2p file");

                string newName = Path.GetFileNameWithoutExtension(_pathesToFileDUTPattern[n]) + "_deembedded" + Path.GetExtension(_pathesToFileDUTPattern[n]);

                switch (_currMethod)
                {
                    case "open":
                        OpenMethod(ref fileDUTPattern); break;
                    case "l-2l":
                        L2LMethod(ref fileDUTPattern); break;
                    case "open-short":
                        OpenShortMethod(ref fileDUTPattern); break;
                    case "pad-open-short":
                        PadOpenShortMethod(ref fileDUTPattern); break;
                }

                fileDUTPattern.SaveFile(pathToSaveFolder + "\\" + newName);
            }
        }
        public void L2LMethodDeEmbedding(string pathToFileLinePattern, string pathToFileTwoLinePattern, string[] pathesToFileDUTPattern, string pathToSaveFolder)
        {
            _pathesToFileDUTPattern = (string[])pathesToFileDUTPattern.Clone();

            _pathToFileLinePattern = pathToFileLinePattern;
            _pathToFileTwoLinePattern = pathToFileTwoLinePattern;

            _fileLinePattern = new Curve(pathToFileLinePattern);
            _fileTwoLinePattern = new Curve(pathToFileTwoLinePattern);
            _fileLinePattern.SetFormatOfPoints("RI");
            _fileTwoLinePattern.SetFormatOfPoints("RI");

            _currMethod = "l-2l";

            CalcAndSaveResult(pathToSaveFolder);
        }