Exemple #1
0
        public override ReturnCode IngestFile(ChannelCompartment compartment, string fileName)
        {
            ReturnCode returnCode = bidParser.ParseFile(fileName);
            DataFile   dataFile   = new DataFile(fileName, bidParser.GetDate());
            int        numRecords = bidParser.GetNumRecords();
            DateTime   time       = DateTime.MinValue;

            for (int r = 0; r < numRecords; ++r)
            {
                time = bidParser.BIDTimeToDateTime(bidParser.GetRecord(r).time);
                channels[chACountRate].AddDataPoint(compartment, time, bidParser.GetRecord(r).chACountRate, dataFile);
                channels[chBCountRate].AddDataPoint(compartment, time, bidParser.GetRecord(r).chBCountRate, dataFile);
                channels[chCCountRate].AddDataPoint(compartment, time, bidParser.GetRecord(r).chCCountRate, dataFile);
                channels[gamInGamCh1].AddDataPoint(compartment, time, bidParser.GetRecord(r).gamInGamCh1, dataFile);
                channels[gamCh1Sigma].AddDataPoint(compartment, time, bidParser.GetRecord(r).gamCh1Sigma, dataFile);
                channels[gamInGamCh2].AddDataPoint(compartment, time, bidParser.GetRecord(r).gamInGamCh2, dataFile);
                channels[gamCh2Sigma].AddDataPoint(compartment, time, bidParser.GetRecord(r).gamCh2Sigma, dataFile);
            }

            dataFile.DataEnd = time;

            bidParser = new BIDParser();

            return(ReturnCode.SUCCESS);
        }
Exemple #2
0
 public void AddDataPoint(ChannelCompartment compartment, DateTime time, double value, TimeSpan duration, DataFile file)
 {
     timeStamps[(int)compartment].Add(time);
     values[(int)compartment].Add(value);
     durations[(int)compartment].Add(duration);
     files[(int)compartment].Add(file);
 }
Exemple #3
0
 public void AddDataPoint(ChannelCompartment compartment, DateTime time, Spectrum spectrum, TimeSpan duration, DataFile file)
 {
     timeStamps[(int)compartment].Add(time);
     values[(int)compartment].Add(roi.GetROICountRate(spectrum));
     durations[(int)compartment].Add(duration);
     files[(int)compartment].Add(file);
 }
Exemple #4
0
 public void ImportFromChannel(Channel channel, ChannelCompartment compartment)
 {
     TimeStamps = channel.GetTimeStamps(compartment);
     Durations  = channel.GetDurations(compartment);
     Values     = channel.GetValues(compartment);
     Files      = channel.GetFiles(compartment);
 }
Exemple #5
0
        public override ReturnCode IngestFile(ChannelCompartment compartment, string fileName)
        {
            ReturnCode returnCode = spectrumParser.ParseSpectrumFile(fileName);
            Spectrum   spectrum   = spectrumParser.GetSpectrum();
            DateTime   time       = spectrum.GetStartTime();
            TimeSpan   duration   = TimeSpan.FromSeconds(spectrum.GetRealTime());
            DataFile   dataFile   = new DataFile(fileName, time, time + duration);
            int        counts     = 0;

            for (int ch = 0; ch < spectrum.GetNChannels(); ch++)
            {
                counts += spectrum.GetCounts()[ch];
            }
            channels[COUNT_RATE].AddDataPoint(compartment, time, counts / spectrum.GetLiveTime(), duration, dataFile);


            foreach (VirtualChannel chan in virtualChannels)
            {
                if (chan is ROIChannel)
                {
                    ((ROIChannel)chan).AddDataPoint(compartment, time, spectrum, duration, dataFile);
                }
            }
            return(ReturnCode.SUCCESS);
        }
Exemple #6
0
        public override ReturnCode IngestFile(ChannelCompartment compartment, string fileName)
        {
            DateTime dateTime = GetFileDate(fileName);
            DataFile dataFile = new DataFile(fileName, dateTime);

            channels[0].AddDataPoint(compartment, dateTime, 1, dataFile);

            return(ReturnCode.SUCCESS);
        }
Exemple #7
0
 public void ClearData(ChannelCompartment compartment)
 {
     timeStamps[(int)compartment] = new List <DateTime>();
     values[(int)compartment]     = new List <double>();
     files[(int)compartment]      = new List <DataFile>();
     if (channelType == ChannelType.DURATION_VALUE)
     {
         durations[(int)compartment] = new List <TimeSpan>();
     }
 }
Exemple #8
0
 public override void CalculateValues(ChannelCompartment compartment)
 {
     if (channelType == ChannelType.DURATION_VALUE)
     {
         durations[(int)compartment] = Channel.GetDurations(compartment);
     }
     timeStamps[(int)compartment] = Channel.GetTimeStamps(compartment);
     double[] arrayVals = SignalProcessor.Convolve(Channel.GetValues(compartment).ToArray(), SignalProcessor.FromFile(File));
     values[(int)compartment] = arrayVals.ToList();
 }
        public override ReturnCode IngestFile(ChannelCompartment compartment, string fileName)
        {
            ReturnCode returnCode = decParser.ParseDeclarationFile(fileName);
            DateTime   time       = decParser.FromTime;
            TimeSpan   duration   = decParser.ToTime - decParser.FromTime;

            DataFile dataFile = new DataFile(fileName, time, time + duration);

            channels[DECLARATION].AddDataPoint(compartment, time, 1, duration, dataFile);
            return(ReturnCode.FAIL);
        }
Exemple #10
0
        public override void CalculateValues(ChannelCompartment compartment)
        {
            values[(int)compartment] = Channel.GetValues(compartment);
            List <DateTime> times = Channel.GetTimeStamps(compartment);

            DateTime[] arrayTimeStamps = new DateTime[times.Count];
            for (int i = 0; i < times.Count; i++)
            {
                arrayTimeStamps[i] = times[i].AddTicks(Delay.Ticks);
            }
            timeStamps[(int)compartment] = arrayTimeStamps.ToList();
        }
Exemple #11
0
        public override void CalculateValues(ChannelCompartment compartment)
        {
            double[] arrayVals = new double[ChannelA.GetValues(compartment).Count];
            if (channelType == ChannelType.DURATION_VALUE)
            {
                durations[(int)compartment] = ChannelA.GetDurations(compartment);
            }
            List <double> A = ChannelA.GetValues(compartment);
            List <double> B = ChannelB.GetValues(compartment);

            timeStamps[(int)compartment] = ChannelA.GetTimeStamps(compartment);

            switch (Operation)
            {
            case OperationType.Sum:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = A[i] + B[i];
                }
                break;

            case OperationType.Difference:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = A[i] - B[i];
                }
                break;

            case OperationType.Product:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = A[i] * B[i];
                }
                break;

            case OperationType.Ratio:
                for (int i = 0; i < A.Count; i++)
                {
                    if (B[i] == 0)
                    {
                        arrayVals[i] = 0;
                    }
                    else
                    {
                        arrayVals[i] = A[i] / B[i];
                    }
                }
                break;
            }
            values[(int)compartment] = arrayVals.ToList();
        }
Exemple #12
0
        public List <DataFile> GetFiles(ChannelCompartment compartment, DateTime start, DateTime end)
        {
            List <DataFile> outFiles = new List <DataFile>();

            for (int i = 0; i < files.Count(); i++)
            {
                if (timeStamps[(int)compartment][i] >= start && timeStamps[(int)compartment][i] <= end)
                {
                    if (!outFiles.Contains(files[(int)compartment][i]))
                    {
                        outFiles.Add(files[(int)compartment][i]);
                    }
                }
            }
            return(outFiles);
        }
Exemple #13
0
        /// <summary>
        ///
        /// </summary>
        /// <remarks>Binary search FTW</remarks>
        /// <param name="dateTime"></param>
        /// <returns></returns>
        public int FindFirstIndexAfter(ChannelCompartment compartment, DateTime dateTime)
        {
            int count = timeStamps[(int)compartment].Count;

            if (count == 0 || timeStamps[(int)compartment][0] > dateTime)
            {
                return(0);
            }
            if (dateTime > timeStamps[(int)compartment][count - 1])
            {
                return(count);
            }

            int lastSmallerIndex = 0;
            int lastBiggerIndex  = count - 1;
            int index            = count / 2;
            int nextIndex;

            while (true)
            {
                if (timeStamps[(int)compartment][index] > dateTime)
                {
                    // Go down
                    if (timeStamps[(int)compartment][index - 1] < dateTime)
                    {
                        return(index);
                    }
                    nextIndex       = (lastSmallerIndex + index) / 2;
                    lastBiggerIndex = index;
                    index           = nextIndex;
                }
                else
                {
                    // Go up
                    if (timeStamps[(int)compartment][index + 1] > dateTime)
                    {
                        return(index + 1);
                    }
                    nextIndex        = (lastBiggerIndex + index) / 2;
                    lastSmallerIndex = index;
                    index            = nextIndex;
                }
            }
        }
Exemple #14
0
        public void Sort(ChannelCompartment compartment)
        {
            DateTime[] stampArray = timeStamps[(int)compartment].ToArray();
            double[]   valueArray = values[(int)compartment].ToArray();
            DataFile[] fileArray  = files[(int)compartment].ToArray();

            if (channelType == ChannelType.DURATION_VALUE)
            {
                TimeSpan[] durationArray = durations[(int)compartment].ToArray();
                Array.Sort(stampArray.ToArray(), durationArray);
                durations[(int)compartment] = durationArray.ToList();
            }
            Array.Sort(stampArray.ToArray(), fileArray);
            Array.Sort(stampArray, valueArray);

            timeStamps[(int)compartment] = stampArray.ToList();
            values[(int)compartment]     = valueArray.ToList();
            files[(int)compartment]      = fileArray.ToList();
        }
Exemple #15
0
        public double GetAverage(ChannelCompartment compartment, DateTime start, DateTime end)
        {
            int count      = timeStamps[(int)compartment].Count;
            int startIndex = FindFirstIndexAfter(compartment, start);
            int endIndex   = FindFirstIndexAfter(compartment, end);

            if (startIndex >= count || endIndex == 0 || startIndex >= endIndex)
            {
                return(double.NaN);
            }

            double sum = 0;

            for (int i = startIndex; i < endIndex; ++i)
            {
                sum += values[(int)compartment][i];
            }
            return(sum / (endIndex - startIndex));
        }
Exemple #16
0
 public void ExportToChannel(Channel channel, ChannelCompartment compartment)
 {
     if (compartment == ChannelCompartment.View && channel.Hidden == true)
     {
         // No need to view hidden data
         return;
     }
     if (channel is VirtualChannel)
     {
         if (Durations.Count == 0)
         {
             for (int i = 0; i < TimeStamps.Count; i++)
             {
                 channel.AddDataPoint(compartment, TimeStamps[i], Values[i], null);
             }
         }
         else
         {
             for (int i = 0; i < TimeStamps.Count; i++)
             {
                 channel.AddDataPoint(compartment, TimeStamps[i], Values[i], Durations[i], null);
             }
         }
     }
     else
     {
         if (Durations.Count == 0)
         {
             for (int i = 0; i < TimeStamps.Count; i++)
             {
                 channel.AddDataPoint(compartment, TimeStamps[i], Values[i], Files[i]);
             }
         }
         else
         {
             for (int i = 0; i < TimeStamps.Count; i++)
             {
                 channel.AddDataPoint(compartment, TimeStamps[i], Values[i], Durations[i], Files[i]);
             }
         }
     }
 }
Exemple #17
0
        public double GetStandardDeviation(ChannelCompartment compartment, DateTime start, DateTime end)
        {
            int count      = timeStamps[(int)compartment].Count;
            int startIndex = FindFirstIndexAfter(compartment, start);
            int endIndex   = FindFirstIndexAfter(compartment, end);

            if (startIndex >= count || endIndex == 0 || startIndex >= endIndex)
            {
                return(double.NaN);
            }

            double average             = GetAverage(compartment, start, end);
            double sumSquareDeviations = 0;

            for (int i = startIndex; i < endIndex; i++)
            {
                sumSquareDeviations += (values[(int)compartment][i] - average) * (values[(int)compartment][i] - average);
            }

            return(Math.Sqrt(sumSquareDeviations / (endIndex - startIndex)));
        }
Exemple #18
0
        public override ReturnCode IngestFile(ChannelCompartment compartment, string fileName)
        {
            DateTime time     = DateTime.MinValue;
            DataFile dataFile = new DataFile(fileName);

            dataFile.DataStart = GetFileDate(fileName);

            ReturnCode returnCode = csvParser.ParseFile(fileName);

            int numRecords = csvParser.GetNumRecords();

            if (HasEndTimes)
            {
                for (int r = 0; r < numRecords; ++r)
                {
                    time = csvParser.EndTimes[r];
                    for (int c = 0; c < numChannels; c++)
                    {
                        channels[c].AddDataPoint(compartment, csvParser.TimeStamps[r], csvParser.Data[r, c], time - csvParser.TimeStamps[r], dataFile);
                    }
                }
            }
            else
            {
                for (int r = 0; r < numRecords; ++r)
                {
                    time = csvParser.TimeStamps[r];
                    for (int c = 0; c < numChannels; c++)
                    {
                        channels[c].AddDataPoint(compartment, time, csvParser.Data[r, c], dataFile);
                    }
                }
            }

            dataFile.DataEnd = time;

            MakeNewParser();

            return(ReturnCode.SUCCESS);
        }
Exemple #19
0
        public override ReturnCode IngestFile(ChannelCompartment compartment, string fileName)
        {
            ReturnCode returnCode = isrParser.ParseFile(fileName);
            DataFile   dataFile   = new DataFile(fileName, isrParser.GetDate());
            int        numRecords = isrParser.GetNumRecords();
            DateTime   time       = DateTime.MinValue;

            for (int r = 0; r < numRecords; ++r)
            {
                time = isrParser.ISRTimeToDateTime(isrParser.GetRecord(r).time);
                channels[TOTALS1].AddDataPoint(compartment, time, isrParser.GetRecord(r).totals1, dataFile);
                channels[TOTALS2].AddDataPoint(compartment, time, isrParser.GetRecord(r).totals2, dataFile);
                channels[TOTALS3].AddDataPoint(compartment, time, isrParser.GetRecord(r).totals3, dataFile);
                channels[REALS_PLUS_ACC].AddDataPoint(compartment, time, isrParser.GetRecord(r).realsPlusAccidentals, dataFile);
                channels[ACC].AddDataPoint(compartment, time, isrParser.GetRecord(r).accidentals, dataFile);
            }
            dataFile.DataEnd = time;

            isrParser = new ISRParser();

            return(ReturnCode.SUCCESS);
        }
Exemple #20
0
        public double GetMin(ChannelCompartment compartment, DateTime start, DateTime end)
        {
            int count      = timeStamps[(int)compartment].Count;
            int startIndex = FindFirstIndexAfter(compartment, start);
            int endIndex   = FindFirstIndexAfter(compartment, end);

            if (startIndex >= count || endIndex == 0 || startIndex >= endIndex)
            {
                return(double.NaN);
            }

            double min = double.MaxValue;

            for (int i = startIndex; i < endIndex; i++)
            {
                if (values[(int)compartment][i] < min)
                {
                    min = values[(int)compartment][i];
                }
            }
            return(min);
        }
Exemple #21
0
        public override ReturnCode IngestFile(ChannelCompartment compartment, string fileName)
        {
            ReturnCode returnCode = vbfParser.ParseFile(fileName);
            DataFile   dataFile   = new DataFile(fileName, vbfParser.GetDate());
            DateTime   time       = DateTime.MinValue;
            int        numRecords = vbfParser.GetNumRecords();

            for (int r = 0; r < numRecords; ++r)
            {
                time = vbfParser.VBFTimeToDateTime(vbfParser.GetRecord(r).time);
                channels[data0].AddDataPoint(compartment, time, vbfParser.GetRecord(r).data[0], dataFile);
                channels[data1].AddDataPoint(compartment, time, vbfParser.GetRecord(r).data[1], dataFile);
                channels[data2].AddDataPoint(compartment, time, vbfParser.GetRecord(r).data[2], dataFile);
                channels[data3].AddDataPoint(compartment, time, vbfParser.GetRecord(r).data[3], dataFile);
                channels[data4].AddDataPoint(compartment, time, vbfParser.GetRecord(r).data[4], dataFile);
                channels[data5].AddDataPoint(compartment, time, vbfParser.GetRecord(r).data[5], dataFile);
                channels[data6].AddDataPoint(compartment, time, vbfParser.GetRecord(r).data[6], dataFile);
                channels[data7].AddDataPoint(compartment, time, vbfParser.GetRecord(r).data[7], dataFile);
            }
            dataFile.DataEnd = time;
            vbfParser        = new VBFParser();
            return(ReturnCode.SUCCESS);
        }
Exemple #22
0
        public override void CalculateValues(ChannelCompartment compartment)
        {
            double[] arrayVals = new double[Channel.GetValues(compartment).Count];
            if (channelType == ChannelType.DURATION_VALUE)
            {
                durations[(int)compartment] = Channel.GetDurations(compartment);
            }
            List <double> A = Channel.GetValues(compartment);

            timeStamps[(int)compartment] = Channel.GetTimeStamps(compartment);

            switch (Operation)
            {
            case OperationType.Sum:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = A[i] + Constant;
                }
                break;

            case OperationType.Product:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = A[i] * Constant;
                }
                break;

            case OperationType.Power:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Pow(A[i], Constant);
                }
                break;
            }
            values[(int)compartment] = arrayVals.ToList();
        }
Exemple #23
0
 public override void CalculateValues(ChannelCompartment compartment)
 {
 }
Exemple #24
0
 public List <double> GetValues(ChannelCompartment compartment)
 {
     return(values[(int)compartment]);
 }
Exemple #25
0
 public List <DataFile> GetFiles(ChannelCompartment compartment)
 {
     return(files[(int)compartment]);
 }
Exemple #26
0
        public override void CalculateValues(ChannelCompartment compartment)
        {
            double[] arrayVals = new double[Channel.GetValues(compartment).Count];

            if (channelType == ChannelType.DURATION_VALUE)
            {
                durations[(int)compartment] = Channel.GetDurations(compartment);
            }

            List <double> A = Channel.GetValues(compartment);

            timeStamps[(int)compartment] = Channel.GetTimeStamps(compartment);

            switch (Statistic)
            {
            case StatisticType.Max:
                double max;
                for (int i = 0; i < A.Count; i++)
                {
                    max = double.MinValue;
                    for (int j = i; j > i - Period; j--)
                    {
                        if (j < 0)
                        {
                            break;
                        }
                        if (A[j] > max)
                        {
                            max = A[j];
                        }
                    }
                    arrayVals[i] = max;
                }
                break;

            case StatisticType.Min:
                double min;
                for (int i = 0; i < A.Count; i++)
                {
                    min = double.MaxValue;
                    for (int j = i; j >= i - Period; j--)
                    {
                        if (j < 0)
                        {
                            break;
                        }
                        if (A[j] < min)
                        {
                            min = A[j];
                        }
                    }
                    arrayVals[i] = min;
                }
                break;

            case StatisticType.Average:
                double sum = 0;
                for (int i = 0; i < A.Count; i++)
                {
                    sum += A[i];
                    if (i < Period)
                    {
                        arrayVals[i] = sum / i;
                    }
                    else
                    {
                        sum         -= A[i - Period];
                        arrayVals[i] = sum / Period;
                    }
                }
                break;

            case StatisticType.StandardDeviation:
                double movingSum = 0;
                double average   = 0;
                double sumSq     = 0;
                for (int i = 0; i < A.Count; i++)
                {
                    sumSq      = 0;
                    movingSum += A[i];
                    if (i < Period)
                    {
                        average = movingSum / i;
                        for (int j = i; j >= 0; j--)
                        {
                            sumSq += (A[i] - average) * (A[i] - average);
                        }
                        arrayVals[i] = Math.Sqrt(sumSq / i);
                    }
                    else
                    {
                        movingSum -= A[i - Period];
                        average    = movingSum / Period;
                        for (int j = i; j > i - Period; j--)
                        {
                            sumSq += (A[i] - average) * (A[i] - average);
                        }
                        arrayVals[i] = Math.Sqrt(sumSq / Period);
                    }
                }
                break;
            }
            values[(int)compartment] = arrayVals.ToList();
        }
Exemple #27
0
        public void LoadDataIntoInstrument(ChannelCompartment compartment, DateTimeRange timeRange)
        {
            // Buffer around the time range
            timeRange.Start = timeRange.Start.AddDays(-1);
            timeRange.End   = timeRange.End.AddDays(1);

            // Make sure needed data is in cache
            if (Days.Count == 0)
            {
                // No data - start fresh
                LoadFreshRange(timeRange);
            }
            else
            {
                DateTimeRange loadedRange = new DateTimeRange(Days.First.Value.Date, Days.Last.Value.Date);
                if (!loadedRange.CompletelyInRange(timeRange))
                {
                    if (timeRange.End < loadedRange.Start.AddDays(-1) || timeRange.Start > loadedRange.End.AddDays(1))
                    {
                        // No overlap - start fresh
                        LoadFreshRange(timeRange);
                    }
                    else
                    {
                        // The following two conditions are not mutually exclusive
                        if (timeRange.Start < loadedRange.Start)
                        {
                            List <DateTime> days = timeRange.DaysBefore(loadedRange.Start);
                            PreventativeMemoryManagement(days, timeRange);
                            AddDaysToFront(days);
                        }
                        if (timeRange.End > loadedRange.End)
                        {
                            List <DateTime> days = timeRange.DaysAfter(loadedRange.End);
                            PreventativeMemoryManagement(days, timeRange);
                            AddDaysToEnd(days);
                        }
                        ReactiveMemoryManagement(timeRange);
                    }
                }
            }

            // Copy data into instrument
            Instrument.ClearData(compartment);

            DateTimeRange dayRange = new DateTimeRange(
                new DateTime(timeRange.Start.Year, timeRange.Start.Month, timeRange.Start.Day),
                new DateTime(timeRange.End.Year, timeRange.End.Month, timeRange.End.Day));

            Channel[] channels = Instrument.GetChannels();
            foreach (DayCache dayCache in Days)
            {
                if (dayCache.Date >= dayRange.Start && dayCache.Date <= dayRange.End)
                {
                    for (int ch = 0; ch < Instrument.GetChannels().Length; ch++)
                    {
                        dayCache.BaseData[ch].ExportToChannel(channels[ch], compartment);
                    }
                }
            }
        }
Exemple #28
0
 public abstract void CalculateValues(ChannelCompartment compartment);
Exemple #29
0
 public List <TimeSpan> GetDurations(ChannelCompartment compartment)
 {
     return(durations[(int)compartment]);
 }
Exemple #30
0
        public override void CalculateValues(ChannelCompartment compartment)
        {
            double[] arrayVals = new double[Channel.GetValues(compartment).Count];

            if (channelType == ChannelType.DURATION_VALUE)
            {
                durations[(int)compartment] = Channel.GetDurations(compartment);
            }

            List <double> A = Channel.GetValues(compartment);

            timeStamps[(int)compartment] = Channel.GetTimeStamps(compartment);

            switch (Operation)
            {
            case OperationType.Abs:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Abs(A[i]);
                }
                break;

            case OperationType.Acos:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Acos(A[i]);
                }
                break;

            case OperationType.Asin:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Asin(A[i]);
                }
                break;

            case OperationType.Atan:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Atan(A[i]);
                }
                break;

            case OperationType.Cos:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Cos(A[i]);
                }
                break;

            case OperationType.Cosh:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Cosh(A[i]);
                }
                break;

            case OperationType.Exp:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Exp(A[i]);
                }
                break;

            case OperationType.Log:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Log(A[i]);
                }
                break;

            case OperationType.Log10:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Log10(A[i]);
                }
                break;

            case OperationType.Sign:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Sign(A[i]);
                }
                break;

            case OperationType.Sin:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Sin(A[i]);
                }
                break;

            case OperationType.Sinh:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Sinh(A[i]);
                }
                break;

            case OperationType.Sqrt:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Sqrt(A[i]);
                }
                break;

            case OperationType.Tan:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Tan(A[i]);
                }
                break;

            case OperationType.Tanh:
                for (int i = 0; i < A.Count; i++)
                {
                    arrayVals[i] = Math.Tanh(A[i]);
                }
                break;
            }
            for (int i = 0; i < A.Count; i++)
            {
                if (double.IsInfinity(arrayVals[i]))
                {
                    arrayVals[i] = double.NaN;
                }
            }
            values[(int)compartment] = arrayVals.ToList();
        }