public double CalculateWeight()
 {
     if (MillimeterColumnOMM == null)
     {
         throw new InvalidOperationException("MillimeterColumnOMM can not be null when calling CalculateWeight");
     }
     if (PixelColumn == null)
     {
         throw new InvalidOperationException("PixelColumn can not be null when calling CalculateWeight");
     }
     return(MillimeterColumnOMM.Zip(PixelColumn, (miliDist, pixelDist) => miliDist / pixelDist).Average());
 }
        public void EstimateBiasedMillimeterDistances()
        {
            if (MillimeterColumnOMM == null)
            {
                throw new InvalidOperationException("MillimeterColumnOMM can not be null when calling CalculateWeight");
            }
            if (PixelColumn == null)
            {
                throw new InvalidOperationException("PixelColumn can not be null when calling CalculateWeight");
            }

            var millimeterDistancesUnbiased = PixelColumn.Times(Weight);

            OMMvsEstimateDiff = new DataColumn("Diff", MillimeterColumnOMM.Subtract(millimeterDistancesUnbiased));
            Bias = OMMvsEstimateDiff.Average();
            MillimeterColumnEstimate = new DataColumn("MillimeterColumnEstimate",
                                                      millimeterDistancesUnbiased.Select(dist => dist + Bias));
        }