Beispiel #1
0
        private LineSeries MetaSerieRate(DataType datatype, GrowthMeasurements growthMeasurements, bool isFirstDeriv = false)
        {
            if (!growthMeasurements.VariableMetaDatas.ContainsKey(datatype))
            {
                return(null);
            }

            var metaSerieRate = CreateMetaSerie(Colors.Red, 12, ShapeType.Cross);
            var dataSeries    = new DataSeries <double, double>("Rate Macro Data");

            foreach (var metaData in growthMeasurements.VariableMetaDatas[datatype].Rate)
            {
                float od;
                if (isFirstDeriv)
                {
                    od = growthMeasurements.GetMeasurements(DataType.FirstDerivative).First(m => Math.Abs(m.Time - metaData.Time) < double.Epsilon).OD;
                }
                else
                {
                    od = metaData.OD;
                }
                var point = new DataPoint <double, double>(metaData.Time, od);
                dataSeries.Add(point);
            }
            metaSerieRate.DataSeries = dataSeries;
            return(metaSerieRate);
        }
Beispiel #2
0
        private LineSeries MetaSerieLag(DataType datatype, GrowthMeasurements growthMeasurements)
        {
            if (!growthMeasurements.VariableMetaDatas.ContainsKey(datatype))
            {
                return(null);
            }

            var metaSerieLag = CreateMetaSerie(Colors.Violet, 8, ShapeType.Ellipse);
            var dataSeries   = new DataSeries <double, double>("Lag Macro Data");

            foreach (var metaData in growthMeasurements.VariableMetaDatas[datatype].Lag)
            {
                foreach (var groundPoint in metaData.GroundPoints)
                {
                    var point = new DataPoint <double, double>(groundPoint.Time, groundPoint.OD);
                    dataSeries.Add(point);
                }
            }
            foreach (var metaData in growthMeasurements.VariableMetaDatas[datatype].Lag)
            {
                foreach (var slopePoint in metaData.SlopePoints)
                {
                    var point = new DataPoint <double, double>(slopePoint.Time, slopePoint.OD);
                    dataSeries.Add(point);
                }
            }
            foreach (var metaData in growthMeasurements.VariableMetaDatas[datatype].Lag)
            {
                var point = new DataPoint <double, double>(metaData.InterceptTime, metaData.InterceptOD);
                dataSeries.Add(point);
            }

            metaSerieLag.DataSeries = dataSeries;
            return(metaSerieLag);
        }
Beispiel #3
0
 private static void CreateSeriesFromCulture(GrowthMeasurements growthMeasurements, string container, List <DataType> validTypes, ref GrowthGraph graph, ref Range odRange, ref Range timeRange)
 {
     foreach (KeyValuePair <DataType, List <GrowthMeasurement> > pair in growthMeasurements.Measurements)
     {
         if (!validTypes.Contains(pair.Key))
         {
             continue;
         }
         if (pair.Value.Count > 0)
         {
             string type     = string.Format(CultureInfo.InvariantCulture, "({0})", pair.Key.ToString());
             var    newGraph = CreateNewSeries(pair.Value, container + type + " [" + pair.Value.Count + "]", ref odRange, ref timeRange);
             graph.GrowthSeries.Add(new GrowthSeries {
                 DataType = pair.Key, Series = newGraph
             });
         }
     }
 }
Beispiel #4
0
        private LineSeries MetaSerieYield(DataType datatype, GrowthMeasurements growthMeasurements)
        {
            if (!growthMeasurements.VariableMetaDatas.ContainsKey(datatype))
            {
                return(null);
            }

            var metaSerieYield = CreateMetaSerie(Colors.Lime, 12, ShapeType.Triangle);
            var dataSeries     = new DataSeries <double, double>("Yield Macro Data");

            foreach (var metaData in growthMeasurements.VariableMetaDatas[datatype].Yield.LowestPoints)
            {
                var point = new DataPoint <double, double>(metaData.Time, metaData.OD);
                dataSeries.Add(point);
            }
            foreach (var metaData in growthMeasurements.VariableMetaDatas[datatype].Yield.HighestPoints)
            {
                var point = new DataPoint <double, double>(metaData.Time, metaData.OD);
                dataSeries.Add(point);
            }
            metaSerieYield.DataSeries = dataSeries;
            return(metaSerieYield);
        }