Replace CntrlComparison with LeafGasComparison
This commit is contained in:
@@ -8,7 +8,7 @@ namespace LeafWeb.Core.Charter
|
||||
{
|
||||
public static class CurveDataConverter
|
||||
{
|
||||
public static IEnumerable<CurveData> Convert(IEnumerable<CntrlComparison> cntrlComparison)
|
||||
public static IEnumerable<CurveData> Convert(IEnumerable<LeafGasComparison> cntrlComparison)
|
||||
{
|
||||
var comparisonGroups =
|
||||
from comparison in cntrlComparison
|
||||
@@ -17,12 +17,12 @@ namespace LeafWeb.Core.Charter
|
||||
{
|
||||
CurveID = curves.Key,
|
||||
FitType = from curve in curves
|
||||
group curve by new {curve.FitGi, curve.FitGammaStar} into grp
|
||||
group curve by new {curve.FitRwp, curve.FitGammaStar} into grp
|
||||
select new
|
||||
{
|
||||
grp.Key.FitGi,
|
||||
grp.Key.FitRwp,
|
||||
grp.Key.FitGammaStar,
|
||||
Comparison = grp.SingleOrDefault()
|
||||
Comparison = grp.FirstOrDefault() // TODO: this may need to be SingleOrDefault
|
||||
}
|
||||
};
|
||||
|
||||
@@ -44,13 +44,13 @@ namespace LeafWeb.Core.Charter
|
||||
// gammastar = chloroplastic CO2 partial pressure photocompensation point = "Cmp"
|
||||
|
||||
// put each comparison into the correct curve location
|
||||
if (!fitType.FitGi && !fitType.FitGammaStar)
|
||||
if (!fitType.FitRwp && !fitType.FitGammaStar)
|
||||
curveData.FixedCndFixedCmp = paramSet;
|
||||
else if (!fitType.FitGi && fitType.FitGammaStar)
|
||||
else if (!fitType.FitRwp && fitType.FitGammaStar)
|
||||
curveData.FixedCndEstimatedCmp = paramSet;
|
||||
else if (fitType.FitGi && !fitType.FitGammaStar)
|
||||
else if (fitType.FitRwp && !fitType.FitGammaStar)
|
||||
curveData.EstimatedCndFixedCmp = paramSet;
|
||||
else if (fitType.FitGi && fitType.FitGammaStar)
|
||||
else if (fitType.FitRwp && fitType.FitGammaStar)
|
||||
curveData.EstimatedCndEstimatedCmp = paramSet;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace LeafWeb.Core.Charter
|
||||
}
|
||||
}
|
||||
|
||||
private static CurveParamSet ConvertParamSet(CntrlComparison comparison)
|
||||
private static CurveParamSet ConvertParamSet(LeafGasComparison comparison)
|
||||
{
|
||||
var curveParamSet = new CurveParamSet();
|
||||
foreach (var fittingInfo in comparison.FittingInfo)
|
||||
@@ -85,7 +85,7 @@ namespace LeafWeb.Core.Charter
|
||||
return curveParamSet;
|
||||
}
|
||||
|
||||
private static void Set(CurveParamSet paramSet, CntrlComparisonPhotosyntheticInfo item)
|
||||
private static void Set(CurveParamSet paramSet, LeafGasComparisonPhotosyntheticInfo item)
|
||||
{
|
||||
AddXyIfInRange(item.CO2cc, item.Ac, paramSet.AcChloroData.Add); // Ac(y),CO2cc(x)
|
||||
AddXyIfInRange(item.CO2cj, item.Aj, paramSet.AjChloroData.Add); // Aj(y),CO2cj(x)
|
||||
@@ -103,12 +103,12 @@ namespace LeafWeb.Core.Charter
|
||||
set(xyPoint);
|
||||
}
|
||||
|
||||
private static void Set(CurveParamSet paramSet, CntrlComparisonFittingInfo fittingInfo)
|
||||
private static void Set(CurveParamSet paramSet, LeafGasComparisonFittingInfo fittingInfo)
|
||||
{
|
||||
var xyPoint1 = new XyPoint(fittingInfo.PCO2c, fittingInfo.AnetMeas); // AnetMeas(y), PCO2c(x)
|
||||
var xyPoint2 = new XyPoint(fittingInfo.PCO2i, fittingInfo.AnetMeas);
|
||||
var xyPoint1 = new XyPoint(fittingInfo.CO2c, fittingInfo.Anet_obs); // AnetMeas(y), PCO2c(x)
|
||||
var xyPoint2 = new XyPoint(fittingInfo.CO2i_obs, fittingInfo.Anet_obs);
|
||||
|
||||
switch (fittingInfo.PointLimitType)
|
||||
switch (fittingInfo.LimitState)
|
||||
{
|
||||
case 1:
|
||||
paramSet.AnetMeasChloro1Data.Add(xyPoint1);
|
||||
|
||||
Reference in New Issue
Block a user