private GraphData RefineCloned(double threshold, int?precision, Func <bool> isCanceled)
            {
                // Create list of deltas between predicted and measured times
                _outlierIndexes = new HashSet <int>();
                // Start with anything assigned a zero retention time as outliers
                for (int i = 0; i < _peptidesTimes.Count; i++)
                {
                    if (_peptidesTimes[i].RetentionTime == 0)
                    {
                        _outlierIndexes.Add(i);
                    }
                }

                // Now that we have added iRT calculators, RecalcRegression
                // cannot go and mark as outliers peptides at will anymore. It must know which peptides, if any,
                // are required by the calculator for a regression. With iRT calcs, the standard is required.
                if (!_calculator.IsUsable)
                {
                    return(null);
                }

                HashSet <string> standardNames;

                try
                {
                    var names = _calculator.GetStandardPeptides(_peptidesTimes.Select(pep => pep.PeptideSequence));
                    standardNames = new HashSet <string>(names);
                }
                catch (CalculatorException)
                {
                    standardNames = new HashSet <string>();
                }

                var standardPeptides = _peptidesTimes.Where(pep => standardNames.Contains(pep.PeptideSequence)).ToArray();
                var variablePeptides = _peptidesTimes.Where(pep => !standardNames.Contains(pep.PeptideSequence)).ToArray();

                //Throws DatabaseNotConnectedException
                _regressionRefined = (_regressionAll == null
                                          ? null
                                          : _regressionAll.FindThreshold(threshold,
                                                                         precision,
                                                                         0,
                                                                         variablePeptides.Length,
                                                                         standardPeptides,
                                                                         variablePeptides,
                                                                         _statisticsAll,
                                                                         _calculator,
                                                                         _scoreCache,
                                                                         isCanceled,
                                                                         ref _statisticsRefined,
                                                                         ref _outlierIndexes));

                if (ReferenceEquals(_regressionRefined, _regressionAll))
                {
                    return(null);
                }

                // Separate lists into acceptable and outliers
                var listScoresRefined  = new List <double>();
                var listTimesRefined   = new List <double>();
                var listScoresOutliers = new List <double>();
                var listTimesOutliers  = new List <double>();

                for (int i = 0; i < _scoresRefined.Length; i++)
                {
                    if (_outlierIndexes.Contains(i))
                    {
                        listScoresOutliers.Add(_scoresRefined[i]);
                        listTimesOutliers.Add(_timesRefined[i]);
                    }
                    else
                    {
                        listScoresRefined.Add(_scoresRefined[i]);
                        listTimesRefined.Add(_timesRefined[i]);
                    }
                }
                _scoresRefined  = listScoresRefined.ToArray();
                _timesRefined   = listTimesRefined.ToArray();
                _scoresOutliers = listScoresOutliers.ToArray();
                _timesOutliers  = listTimesOutliers.ToArray();

                return(this);
            }