コード例 #1
0
        /// <summary>
        /// Defines the timeseries data (by name) that defines
        /// water temperature values, and the corresponding depths
        /// of the water temperature sensors
        /// </summary>
        /// <param name="sensorSeriesNames"></param>
        /// <param name="depthSeriesNames"></param>
        public void LoadSeries(string[] sensorSeriesNames, string[] depthSeriesNames, string waterSurfaceSeriesName = "")
        {
            if (sensorSeriesNames.Length != depthSeriesNames.Length)
            {
                throw new ArgumentException("sensorSeriesNames must have the same number of items as depthSeriesNames");
            }
            for (int i = 0; i < sensorSeriesNames.Length; i++)
            {
                var ss = m_db.GetSeriesFromName(sensorSeriesNames[i]);
                var ds = m_db.GetSeriesFromName(depthSeriesNames[i]);

                depths.Add(ds);
                sensors.Add(ss);
            }

            if (waterSurfaceSeriesName.Trim() != "")
            {
                waterSurfaceSeries = m_db.GetSeriesFromName(waterSurfaceSeriesName);
                if (waterSurfaceSeries != null)
                {
                    waterSurfaceSeries.Read();
                }
            }

            depths.Read();
            sensors.Read();
        }
コード例 #2
0
ファイル: BaseAnalysis.cs プロジェクト: woohn/Pisces
        /// <summary>
        /// read based on period of record options
        /// series with no data after reading are removed
        /// from the list.
        /// </summary>
        protected void ReadSeriesList(SeriesList list)
        {
            Logger.WriteLine("reading data for " + list.Count + " items ");
            for (int i = 0; i < list.Count; i++)
            {
                list[i].Messages.Clear();
            }

            //list.Read(TimeWindow);

            if (Explorer.TimeWindow.WindowType == TimeWindowType.FullPeriodOfRecord)
            {
                list.Read();
            }
            else
            {
                list.Read(Explorer.TimeWindow.T1, Explorer.TimeWindow.T2);
            }
            return;
        }