Beispiel #1
0
        public void UofIInterpolation()
        {
            SQLiteServer       pDB = new SQLiteServer(path);
            TimeSeriesDatabase DB  = new TimeSeriesDatabase(pDB);

            // Reads input data required by the calculation
            Series daily   = DB.GetSeriesFromName("SS_Day_Mean");
            Series monthly = DB.GetSeriesFromName("TS_Mon_Mean");
            Series known   = DB.GetSeriesFromName("C#Disaggregated-Interpolated");

            daily.Read();
            monthly.Read();
            known.Read(t1, t2);

            Series infilled = Math.UofIStreamflowDisaggregation(daily, monthly);
            var    s        = infilled.Subset(t1, t2);
            double diff     = 0.0;

            for (int i = 0; i < known.Count; i++)
            {
                diff += (known[i].Value - s[i].Value);
            }

            Assert.AreEqual(0.00, diff, 0.01);
        }