Replace CntrlComparison with LeafGasComparison

This commit is contained in:
2016-04-22 11:18:21 -04:00
parent 9e25521034
commit 8f5cbfe3db
20 changed files with 398 additions and 193 deletions
-22
View File
@@ -1,22 +0,0 @@
using System.Collections.Generic;
using System.Linq;
namespace LeafWeb.Core.Entities
{
/// <summary>
/// Part of LeafOutput
/// The file 'cntrlcomparison.csv', which is in comma-separated-value format, contains outputs from PISCAL that
/// facilitates examination of how well the fitting is.
/// </summary>
public class CntrlComparison
{
public virtual IEnumerable<CntrlComparisonFittingInfo> FittingInfo { get; set; }
public virtual IEnumerable<CntrlComparisonPhotosyntheticInfo> PhotosyntheticInfo { get; set; }
public string CurveID => FittingInfo.First().CurveID;
public bool FitGi => FittingInfo.First().FitGi;
public bool FitGammaStar => FittingInfo.First().FitGammaStar;
}
}
-117
View File
@@ -1,117 +0,0 @@
using LeafWeb.Core.Utility;
namespace LeafWeb.Core.Entities
{
/// <summary>
/// First model prediction is calculated at each sampling point.
/// Then model prediction is calculated at many selected levels of intercelluar CO2 partial pressure
/// levels under three limitation states to enable plotting curves.The same structure is then repeated for
/// each fitting of the same curve with different parameters to be estimated and with different curves. Note
/// that some common information about a curve is repeated for each data point to make the structure of the
/// file as regular as possible.
/// </summary>
public class CntrlComparisonFittingInfo
{
/// <summary>
/// the curve identifier, repeated for each point
/// </summary>
[ParseInfo(1)]
public string CurveID { get; set; }
/// <summary>
/// whether or not chlorophyll fluorescence data are used for identifying the limitation states
/// 0 = not used, 1 = used. (Currently this choice is still under evaluation and therefore ChlFlUse? = 0).
/// </summary>
[ParseInfo(2, alternateTitle: "ChlFlUse?")]
public bool ChlFlUse {get; set; }
/// <summary>
/// whether or not the internal conductance (gi) is fitted for.
/// 0 = not fitted and gi is either infinite or fixed at the value provided by the user.
/// 1 = gi is estiamted, repeated for each point
/// </summary>
[ParseInfo(3, alternateTitle: "FitGi?")]
public bool FitGi {get; set;}
/// <summary>
/// whether or not the chloroplastic CO2 partial pressure photocompensation point is
/// fitted for. 0= not fitted, a prescribed value is used, repeated for each point
/// </summary>
[ParseInfo(4, alternateTitle: "FitGamma*?")]
public bool FitGammaStar {get; set; }
/// <summary>
/// whether or not the apparent Michaelis - Menten constant Kco = Kc(1+O/Ko) is fitted for.
/// 0= not fitted, a prescribed value is calculated from Kc, Ko and the oxygen partial pressure.
/// 1= Fitted for, repeated for each point
/// </summary>
[ParseInfo(5, alternateTitle: "FitKco?")]
public bool FitKco {get; set; }
/// <summary>
/// whether the dark respiration is fitted for. 0= not fitted for, a prescribed value is used.
/// 1= fitted for. repeated for each point
/// </summary>
[ParseInfo(6, alternateTitle: "FitRd?")]
public bool FitRd {get; set;}
/// <summary>
/// whether alpha (the non-returned fraction of the glycolate carbon
/// recycled in the photorespiratory cycle) is fitted for.
/// 0= not fitted for and alpha = 0
/// 1= fitted for, repeated for each point
/// </summary>
[ParseInfo(7, alternateTitle: "FitAlpha?")]
public bool FitAlpha {get; set;}
/// <summary>
/// the combination of limitation states present in the A/Ci dataset. Parameters
/// are estimated for those limitation states that occur in the measured curve, repeated for each point
/// Rubisco: Rubisco limitation(Vcmax, Kco)
/// RuBP: RuBP regeneration limitation(J)
/// Tpu: export limitation(TPU, alpha)
/// </summary>
[ParseInfo(8)]
public string LimitCombina { get; set; }
/// <summary>
/// intercellular CO2 partial pressure
/// </summary>
[ParseInfo(9, units:"Pa")]
public double PCO2i { get; set; }
/// <summary>
/// chloroplastic CO2 partial pressure corresponding to the PCO2i of a point.
/// PCO2c=PCO2i-AnetCal/internal conductance
/// </summary>
[ParseInfo(10, units:"Pa")]
public double PCO2c { get; set; }
/// <summary>
/// measured net assimilation rate
/// </summary>
[ParseInfo(11, units: "umol/m2/s")]
public double AnetMeas { get; set; }
/// <summary>
/// calculated net assimilation rate
/// </summary>
[ParseInfo(12, units: "umol/m2/s")]
public double AnetCal { get; set; }
// TODO: readme has weitedrms, data file has PCOiCal
// weitedrms - (umol/m2/s), root mean square error of the fitting (weiting coefficient =1)
[ParseInfo(13)]
public double PCOiCal { get; set; }
/// <summary>
/// 1 = point limited by rubisco
/// 2 = point limited by RuBP regeneration
/// 3 = point limited by TPU
/// </summary>
[ParseInfo(14, units:"1,2,3")]
public int PointLimitType { get; set; }
public virtual CntrlComparison CntrlComparison { get; set; }
}
}
+22
View File
@@ -0,0 +1,22 @@
using System.Collections.Generic;
using System.Linq;
namespace LeafWeb.Core.Entities
{
/// <summary>
/// Part of LeafOutput
/// The file 'leafgascomparison.csv', which is in comma-separated-value format, contains outputs from PISCAL that
/// facilitates examination of how well the fitting is.
/// </summary>
public class LeafGasComparison
{
public virtual IEnumerable<LeafGasComparisonFittingInfo> FittingInfo { get; set; }
public virtual IEnumerable<LeafGasComparisonPhotosyntheticInfo> PhotosyntheticInfo { get; set; }
public string CurveID => FittingInfo.First().CurveID;
public bool FitRwp => FittingInfo.First().FitRwp;
public bool FitGammaStar => FittingInfo.First().FitGammaStar;
}
}
@@ -0,0 +1,65 @@
using LeafWeb.Core.Utility;
namespace LeafWeb.Core.Entities
{
/// <summary>
/// First model prediction is calculated at each sampling point.
/// Then model prediction is calculated at many selected levels of intercelluar CO2 partial pressure
/// levels under three limitation states to enable plotting curves.The same structure is then repeated for
/// each fitting of the same curve with different parameters to be estimated and with different curves. Note
/// that some common information about a curve is repeated for each data point to make the structure of the
/// file as regular as possible.
/// </summary>
public class LeafGasComparisonFittingInfo
{
/// <summary>
/// the curve identifier, repeated for each point
/// </summary>
[ParseInfo(1)]
public string CurveID { get; set; }
/// <summary>
/// whether or not the internal conductance (gi) is fitted for.
/// 0 = not fitted and gi is either infinite or fixed at the value provided by the user.
/// 1 = gi is estiamted, repeated for each point
/// </summary>
[ParseInfo(2, boolEncodedPosition: 1, alternateTitle: "FitRwp|Rch|ha?")] // formerly FitGi
public bool FitRwp {get; set;}
/// <summary>
/// whether or not the chloroplastic CO2 partial pressure photocompensation point is
/// fitted for. 0= not fitted, a prescribed value is used, repeated for each point
/// </summary>
[ParseInfo(4, boolEncodedPosition: 1, alternateTitle: "FitGamma*?")]
public bool FitGammaStar {get; set; }
/// <summary>
/// intercellular CO2 partial pressure
/// </summary>
[ParseInfo(10, units:"Pa")]
public double CO2i_obs { get; set; }
/// <summary>
/// chloroplastic CO2 partial pressure corresponding to the PCO2i of a point.
/// PCO2c=PCO2i-AnetCal/internal conductance
/// </summary>
[ParseInfo(12, units:"Pa")]
public double CO2c { get; set; }
/// <summary>
/// measured net assimilation rate
/// </summary>
[ParseInfo(13, units: "umol/m2/s")]
public double Anet_obs { get; set; }
/// <summary>
/// 1 = point limited by rubisco
/// 2 = point limited by RuBP regeneration
/// 3 = point limited by TPU
/// </summary>
[ParseInfo(15, units:"1,2,3")]
public int LimitState { get; set; }
public virtual LeafGasComparison LeafGasComparison { get; set; }
}
}
@@ -6,7 +6,7 @@ namespace LeafWeb.Core.Entities
/// The second section gives photosynthesis for each of the three limitation states at selected values of intercellular
/// partial pressure.Note that the corresponding values of chloraplastic CO2 partial pressure depend on the limitation state.
/// </summary>
public class CntrlComparisonPhotosyntheticInfo
public class LeafGasComparisonPhotosyntheticInfo
{
/// <summary>
/// intercellular CO2 partial pressure
@@ -50,6 +50,6 @@ namespace LeafWeb.Core.Entities
[ParseInfo(7, units: "umol/m2/s")]
public double At { get; set; }
public virtual CntrlComparison CntrlComparison { get; set; }
public virtual LeafGasComparison LeafGasComparison { get; set; }
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ namespace LeafWeb.Core.Entities
public byte[] Contents { get; set; }
// convention for the filename which LeafCharter uses
public bool IsLeafChartFile => Filename?.StartsWith("cntrlcomparison") ?? false;
public bool IsLeafChartFile => Filename?.Contains("leafgascomparison") ?? false;
public bool IsErrorMessage => Filename?.Contains("errormessage") ?? false;
public bool IsWarningMessage => Filename?.Contains("warningmessage") ?? false;
}