Esempio n. 1
0
        /// <summary>
        /// Smoothes the data on the Y-axis with the Savitzky-Golay filter.
        /// Smooth levels are: spike rejection = 0, low = 1, medium = 2, high = 3, very high = 4.
        /// </summary>
        /// <param name="smoothLevel">The smooth level.</param>
        /// <returns>A smoothed copy of this SimpleCurve</returns>
        /// <exception cref="System.Exception">Wait untill SimpleCurve is finished before smoothing</exception>
        public SimpleCurve Smooth(SmoothLevel smoothLevel)
        {
            if (!IsFinished)
            {
                throw new Exception("Wait untill SimpleCurve is finished before smoothing");
            }

            Curve smoothedCurve = new Curve(Curve, true);

            smoothedCurve.Smooth((int)smoothLevel);
            smoothedCurve.Title = $"{Curve.Title}, smooth level {smoothLevel}";
            return(new SimpleCurve(smoothedCurve, _simpleMeasurement));
        }
Esempio n. 2
0
        public void WriteConfigFile(XmlTextWriter xmlWriter)
        {
            xmlWriter.WriteStartElement("EyeMovementSettings");

            Settings.WriteElement(xmlWriter, "MaxWindowSize", MaxWindowSize.ToString());
            Settings.WriteElement(xmlWriter, "WindowSize", WindowSize.ToString());
            Settings.WriteElement(xmlWriter, "DistanceUserToScreen", DistanceUserToScreen.ToString());
            Settings.WriteElement(xmlWriter, "MaxAngularSpeed", MaxAngularSpeed.ToString());
            Settings.WriteElement(xmlWriter, "MaxDispersion", MaxDispersion.ToString());
            Settings.WriteElement(xmlWriter, "SmoothLevel", SmoothLevel.ToString());
            Settings.WriteElement(xmlWriter, "SmoothNumberOfSamples", SmoothNumberOfSamples.ToString());

            xmlWriter.WriteEndElement();
        }
Esempio n. 3
0
        public void WriteConfigFile(XmlTextWriter xmlWriter)
        {
            xmlWriter.WriteStartElement(Name);

            GTSettings.WriteElement(xmlWriter, "TrackingMethod", Enum.GetName(typeof(TrackingMethodEnum), trackingMethod));
            GTSettings.WriteElement(xmlWriter, "TrackingMode", Enum.GetName(typeof(TrackingModeEnum), trackingMode));
            GTSettings.WriteElement(xmlWriter, "IRPlacement", Enum.GetName(typeof(IRPlacementEnum), irPlacement));

            GTSettings.WriteElement(xmlWriter, "TrackingEye", TrackingEye.ToString());
            GTSettings.WriteElement(xmlWriter, "TrackingPupil", TrackingPupil.ToString());
            GTSettings.WriteElement(xmlWriter, "TrackingGlints", TrackingGlints.ToString());

            GTSettings.WriteElement(xmlWriter, "AutoEye", AutoEye.ToString());
            GTSettings.WriteElement(xmlWriter, "AutoPupil", AutoPupil.ToString());
            GTSettings.WriteElement(xmlWriter, "AutoGlint", AutoGlint.ToString());

            GTSettings.WriteElement(xmlWriter, "PupilThreshold", PupilThreshold.ToString());
            GTSettings.WriteElement(xmlWriter, "PupilThresholdLeft", PupilThresholdLeft.ToString());
            GTSettings.WriteElement(xmlWriter, "PupilThresholdRight", PupilThresholdRight.ToString());
            GTSettings.WriteElement(xmlWriter, "PupilSizeMinimum", PupilSizeMinimum.ToString());
            GTSettings.WriteElement(xmlWriter, "PupilSizeMaximum", PupilSizeMaximum.ToString());

            GTSettings.WriteElement(xmlWriter, "NumberOfGlints", NumberOfGlints.ToString());
            GTSettings.WriteElement(xmlWriter, "GlintThreshold", GlintThreshold.ToString());
            GTSettings.WriteElement(xmlWriter, "GlintThresholdLeft", GlintThresholdLeft.ToString());
            GTSettings.WriteElement(xmlWriter, "GlintThresholdRight", GlintThresholdRight.ToString());
            GTSettings.WriteElement(xmlWriter, "GlintSizeMinimum", GlintSizeMinimum.ToString());
            GTSettings.WriteElement(xmlWriter, "GlintSizeMaximum", GlintSizeMaximum.ToString());

            GTSettings.WriteElement(xmlWriter, "EyeMouseEnabled", EyeMouseEnabled.ToString());
            GTSettings.WriteElement(xmlWriter, "EyeMouseHideCursor", EyeMouseHideCursor.ToString());
            GTSettings.WriteElement(xmlWriter, "EyeMouseSmooth", EyeMouseSmooth.ToString());
            GTSettings.WriteElement(xmlWriter, "SmoothLevel", SmoothLevel.ToString());
            GTSettings.WriteElement(xmlWriter, "EyeCrosshairEnabled", EyeCrosshairEnabled.ToString());

            xmlWriter.WriteEndElement();
        }