private ObservedCurveData mapFrom(DataColumn observedDataColumn, ObservedDataCurveOptions observedDataCurveOptions, IDimension yAxisDimension)
        {
            var observedCurve   = createCurveData(observedDataColumn, observedDataCurveOptions);
            var errorColumn     = errorColumnFor(observedDataColumn);
            var baseGrid        = observedDataColumn.BaseGrid;
            var yDimension      = _dimensionRepository.MergedDimensionFor(observedDataColumn);
            var yErrorDimension = yDimension;

            if (observedCurve.ErrorType == AuxiliaryType.GeometricStdDev)
            {
                yErrorDimension = errorColumn.Dimension;
            }

            baseGrid.Values.Each((value, i) =>
            {
                var observedDataYValue = new ObservedDataYValue
                {
                    Mean      = convertToAxisBaseValue(yAxisDimension, yDimension, observedDataColumn[i]),
                    ErrorType = observedCurve.ErrorType,
                    Error     = convertToAxisBaseValue(yAxisDimension, yErrorDimension, errorColumn[i])
                };
                observedCurve.Add(new TimeProfileXValue(value), observedDataYValue);
            });

            return(observedCurve);
        }
예제 #2
0
        private ObservedCurveData mapFrom(DataColumn observedDataColumn, ObservedDataCurveOptions observedDataCurveOptions)
        {
            var yDimension    = _dimensionRepository.MergedDimensionFor(observedDataColumn);
            var observedCurve = createCurveData(observedDataColumn, observedDataCurveOptions, yDimension);
            var errorColumn   = errorColumnFor(observedDataColumn);
            var baseGrid      = observedDataColumn.BaseGrid;


            baseGrid.Values.Each((value, i) =>
            {
                var observedDataYValue = new ObservedDataYValue
                {
                    Mean      = observedDataColumn[i],
                    ErrorType = observedCurve.ErrorType,
                    Error     = errorColumn[i],
                };
                observedCurve.Add(new TimeProfileXValue(value), observedDataYValue);
            });

            return(observedCurve);
        }