public static async Task <GenericLinearMonthlyMeansGridDataHandler> CreateAsync(IStorageContext dataContext)
        {
            var timeIntegrator = new TimeAxisAvgProcessing.MonthlyMeansOverYearsStepIntegratorFacade();
            var a = await GenericLinearGridDataHandlerHelper.EasyConstructAsync(dataContext, timeIntegrator);

            var uncertatintyEvaluator = a.Item1;
            var valuesAggregator      = a.Item2;

            return(new GenericLinearMonthlyMeansGridDataHandler(dataContext, uncertatintyEvaluator, valuesAggregator));
        }
        public static async Task <GenericLinear2DDataHandler> CreateAsync(IStorageContext dataContext)
        {
            var timeIntegrator = new NoTimeAvgProcessing();

            var a = await GenericLinearGridDataHandlerHelper.EasyConstructAsync(dataContext, timeIntegrator);

            var uncertatintyEvaluator = a.Item1;
            var valuesAggregator      = a.Item2;

            return(new GenericLinear2DDataHandler(dataContext, uncertatintyEvaluator, valuesAggregator));
        }
        public static async Task <GenericLinearGridDateTimeStepFunctionDataHandler> CreateAsync(IStorageContext dataContext)
        {
            var timeAxis = await TimeAxisAutodetection.GetTimeAxisAsync(dataContext);

            var timeIntegrator = new TimeAxisAvgFacade(timeAxis, new TimeAxisProjections.DateTimeMoments(), new WeightProviders.StepFunctionInterpolation(), new DataCoverageEvaluators.ContinousMeansCoverageEvaluator());

            var a = await GenericLinearGridDataHandlerHelper.EasyConstructAsync(dataContext, timeIntegrator);

            var uncertatintyEvaluator = a.Item1;
            var valuesAggregator      = a.Item2;

            return(new GenericLinearGridDateTimeStepFunctionDataHandler(dataContext, uncertatintyEvaluator, valuesAggregator));
        }
Пример #4
0
        public static async Task <GenericLinearGridStepFunctionDataHandler> CreateAsync(IStorageContext dataContext)
        {
            var timeAxisDeterction = StepFunctionAutoDetectHelper.SmartDetectAxis(dataContext);
            var detected           = timeAxisDeterction as StepFunctionAutoDetectHelper.AxisFound;

            if (detected == null)
            {
                throw new InvalidOperationException("Can't autodetect time axis. See logs for particular failure reason");
            }
            var axis = await dataContext.GetDataAsync(detected.AxisName);

            var timeIntegrator = StepFunctionAutoDetectHelper.ConstructAverager(detected.AxisKind, axis, detected.BaseOffset);
            var a = await GenericLinearGridDataHandlerHelper.EasyConstructAsync(dataContext, timeIntegrator);

            var uncertatintyEvaluator = a.Item1;
            var valuesAggregator      = a.Item2;

            return(new GenericLinearGridStepFunctionDataHandler(dataContext, uncertatintyEvaluator, valuesAggregator));
        }