public static void AddFittsSequence(FittsSequence sequence) { if (sequencesStats == null) { sequencesStats = new List <SequenceStatistic>(); } sequencesStats.Add(new SequenceStatistic(sequence)); movementTimeMean = sequencesStats.Sum(x => x.timeMean.movementTime) / sequencesStats.Count; errorMean = sequencesStats.Sum(x => x.errorMean) / sequencesStats.Count; throughputMean = sequencesStats.Sum(x => x.throughput) / sequencesStats.Count; }
public SequenceStatistic(FittsSequence _sequence) { trialsStats = new List <TrialStatistic>(); sequence = _sequence; foreach (FittsTrial trial in sequence.fittsTrials) { trialsStats.Add(new TrialStatistic(trial)); } // We effectiveWidth = 4.133 * CalculateStandardDeviation(new List <double>(trialsStats.Select(x => x.dx))); // Ae (mean) effectiveAmplitudeMean = trialsStats.Sum(x => x.effectiveAmplitude) / trialsStats.Count; // IDe effectiveIndexDifficulty = Math.Log((effectiveAmplitudeMean / effectiveWidth) + 1, 2); // TP throughput = effectiveIndexDifficulty / (sequence.fittsTrials.Sum(x => x.time.movementTime) / sequence.fittsTrials.Count); // MT timeMean = new FittsTime(sequence.fittsTrials.Sum(x => x.time.pointingTime) / sequence.fittsTrials.Count, sequence.fittsTrials.Sum(x => x.time.selectionTime) / sequence.fittsTrials.Count); // ER(%) errorMean = (double)sequence.fittsTrials.Where(x => x.isError).Count() / (double)sequence.fittsTrials.Count; errorMean *= 100; // Eye Data eyeData = TargetsCreator.GetEyeData(); }