Beispiel #1
0
        /// <summary>
        /// Load multiple res1d files and set first res1d-file as sampling reference.
        /// </summary>
        /// <param name="res1DFiles"></param>
        /// <param name="samplingPeriodMinutes"></param>
        public Res1DReader(Dictionary <string, string> res1DFiles, int samplingPeriodMinutes = 0)
        {
            foreach (var res1DFile in res1DFiles)
            {
                _res1DData.Add(res1DFile.Key, LoadRes1DResultData(res1DFile.Value));
                _res1DTimes.Add(res1DFile.Key, _res1DData[res1DFile.Key].TimesList.ToArray()); // Save time stamps
            }

            Res1DFileKeySamplingReference = res1DFiles.Keys.First();
            DateTimes = GetDateTimes();

            SamplingPeriod = new TimeSpan(0, samplingPeriodMinutes, 0);
            DoResample     = SamplingPeriod.TotalMinutes > 0;
            if (DoResample)
            {
                DateTimes       = GetDateTimesResample(samplingPeriodMinutes, Res1DFileKeySamplingReference);
                TargetStartTime = DateTimes.First();
            }
        }