Leaf Input Parsing complete

This commit is contained in:
2015-11-20 11:39:23 -05:00
parent 750b2aee7b
commit 1fb73b9f76
26 changed files with 1294 additions and 1 deletions
+54
View File
@@ -0,0 +1,54 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using LeafWeb.Core.Services;
namespace LeafWeb.Core.Models
{
/// <summary>
/// Descriptive information about the investigator,
/// contact information, the site,the sample leaf and its general environmental condition
/// </summary>
public class LeafInput
{
[Key]
public string LeafInputId { get; set; }
public string FileName { get; set; }
[ParseInfo(1, exampleValue: "First and last name")]
public string InvestigatorName { get; set; }
[ParseInfo(2, exampleValue: "Your email / mail addresses")]
public string ContactInformation { get; set; }
[ParseInfo(3, alternateTitle: "Site name in full", exampleValue: "Your site's identifier / name")]
public string SiteName { get; set; }
[ParseInfo(4, exampleValue: "Mixed forest / grasslands / croplands/ etc")]
public string VegetationType { get; set; }
[ParseInfo(5, exampleValue: "Soil type at your site")]
public string SoilType { get; set; }
[ParseInfo(6, exampleValue: "List of major species at the site")]
public string MajorSpecies { get; set; }
[ParseInfo(7,
alternateTitle: "Sample leaf light environment",
exampleValue: "The general light environment in which the leaf is in (e.g. heavily shaded from above)")]
public string SampleLeafLightEnv { get; set; }
[ParseInfo(8, exampleValue: "Indicate whether there is water stress at the time of sampling")]
public string WaterStressAssessment { get; set; }
[ParseInfo(9, exampleValue: "For example - Licor-6400")]
public string InstrumentUsed { get; set; }
[ParseInfo(10, exampleValue: "Any extra information you feel would be helpful to put the sampled leaf in context")]
public string ExtraInfo { get; set; }
public virtual LeafInputSite Site { get; set; }
public virtual LeafInputPhotosynthetic Photosynthetic { get; set; }
public virtual IEnumerable<LeafInputData> Data { get; set; }
}
}
+145
View File
@@ -0,0 +1,145 @@
using System.ComponentModel.DataAnnotations;
using LeafWeb.Core.Services;
namespace LeafWeb.Core.Models
{
/// <summary>
/// A/Ci data for a variety of analyses, including photosynthesis, stomatal conductance, internal conductance, water use efficiency.
/// </summary>
public class LeafInputData
{
public int ListOrder { get; set; }
/// <summary>the data point No.</summary>
[ParseInfo(1, units: "no unit")]
public double? Obs { get; set; }
/// <summary>clock time</summary>
[StringLength(8)]
[ParseInfo(2, units: "hh:mm:ss")]
public string HHMMSS { get; set; }
/// <summary>number of seconds since file opened</summary>
[ParseInfo(3, units: "seconds")]
public double? FTime { get; set; }
/// <summary>photosynthetic rate</summary>
[ParseInfo(4, units: "umol/m2/s")]
public double? Photo { get; set; }
/// <summary>adjusted photosynthetic rate (leakage corrected)</summary>
/// <remarks>required</remarks>
[ParseInfo(5, alternateTitle: "!AdjPhoto", units: "umol/m2/s")]
public double? AdjPhoto { get; set; }
/// <summary>stomatal conductance</summary>
/// <remarks>required</remarks>
[ParseInfo(6, alternateTitle: "!StomCond", units: "mol/m2/s")]
public double? StomCond { get; set; }
/// <summary>intercellular CO2 concentration (umol CO2 / mol moist air)</summary>
[ParseInfo(7, alternateTitle: "!Ci", units: "umol/mol")]
public double? Ci { get; set; }
/// <summary>transpiration rate</summary>
/// <remarks>must provide</remarks>
[ParseInfo(8, alternateTitle: "!Trmmol", units:"mmol/m2/s")]
public double? Trmmol { get; set; }
/// <summary>water vapor pressure deficit based on leaf temperature, must provide</summary>
[ParseInfo(9, alternateTitle: "!VpdL", units: "KPa")]
public double? VpdL { get; set; }
/// <summary>leaf area</summary>
[ParseInfo(10, units:"cm2")]
public double? Area { get; set; }
/// <summary>estimate of the ratio of stomatal conductances of one side of the leaf to the other</summary>
[ParseInfo(11, units: "NA")]
public double? StmRat { get; set; }
/// <summary>total boundary layer conductance</summary>
[ParseInfo(12, units: "mol/m2/s")]
public double? BLCond { get; set; }
/// <summary>temperature in sample cell</summary>
[ParseInfo(13, units: "oC")]
public double? Tair { get; set; }
/// <summary>temperature of leaf thermocouple</summary>
/// <remarks>required</remarks>
[ParseInfo(14, alternateTitle: "!Tleaf", units: "oC")]
public double? Tleaf { get; set; }
/// <summary>IRGA Block temperature</summary>
[ParseInfo(15, units: "oC")]
public double? TBlk { get; set; }
/// <summary>reference CO2 concentration</summary>
[ParseInfo(16, units: "umol/mol")]
public double? CO2R { get; set; }
/// <summary>Sample CO2 concentration</summary>
[ParseInfo(17, units: "umol/mol")]
public double? CO2S { get; set; }
/// <summary>reference cell water vapor concentration</summary>
[ParseInfo(18, units: "mmol/mol")]
public double? H2OR { get; set; }
/// <summary>sample cell water vapor concentration</summary>
[ParseInfo(19, units: "mmol/mol")]
public double? H2OS { get; set; }
/// <summary>(%) Reference cell relative humidity</summary>
[ParseInfo(20)]
public double? RH_R { get; set; }
/// <summary>(%) sample cell relative humidity</summary>
[ParseInfo(21)]
public double? RH_S { get; set; }
/// <summary>(umol/s) molar flow rate of air entering the leaf chamber</summary>
[ParseInfo(22)]
public double? Flow { get; set; }
/// <summary> PAR measured by the in-chamber quantum sensor</summary>
/// <remarks>required</remarks>
[ParseInfo(23, alternateTitle: "!PARi", units: "umol/m2/s")]
public double? PARi { get; set; }
/// <summary>PAR measured by the external quantum sensor</summary>
[ParseInfo(24, units: "umol/m2/s")]
public double? PARo { get; set; }
/// <summary>atmospheric pressure</summary>
[ParseInfo(25, units: "KPa")]
public double? Press { get; set; }
/// <summary>sample CO2 offset</summary>
[ParseInfo(26, units: "umol/mol")]
public double? CsMch { get; set; }
/// <summary>sample H2O offset</summary>
[ParseInfo(27, units: "mmol/mol")]
public double? HsMch { get; set; }
/// <summary>a stability indicator as a decimal value</summary>
[ParseInfo(28, units: "NA")]
public double? StableF { get; set; }
/// <summary>status flag</summary>
[ParseInfo(29, units: "NA")]
public string Status { get; set; }
/// <summary>DeltaF/Fm, the fraction of absorbed PSII photons that are used in photochemistry</summary>
[ParseInfo(30, units: "NA")]
public double? PhiPS2 { get; set; }
/// <summary>atmospheric O2 partial pressure</summary>
[ParseInfo(31, units: "Pa")]
public double? OxygenPress { get; set; }
public virtual LeafInput LeafInput { get; set; }
}
}
+11
View File
@@ -0,0 +1,11 @@
using System.ComponentModel.DataAnnotations;
namespace LeafWeb.Core.Models
{
public class LeafInputFile
{
[Key]
public string LeafInputId { get; set; }
public byte[] File { get; set; }
}
}
+41
View File
@@ -0,0 +1,41 @@
using LeafWeb.Core.Services;
namespace LeafWeb.Core.Models
{
/// <summary>
/// Photosynthetic parameters of Leaf Input
/// </summary>
public class LeafInputPhotosynthetic
{
/// <summary>chloroplastic CO2 photocompensation point</summary>
/// <remarks>must be positive</remarks>
[ParseInfo(1, alternateTitle:"Gamma*", units: "Pa")]
public double GammaStar { get; set; }
/// <summary>Michaelis-Menten constant for RuBP carboxylation</summary>
/// <remarks>must be positive</remarks>
[ParseInfo(2, units: "Pa")]
public double Kc { get; set; }
/// <summary>Michaelis-Menten constant for RuBP oxygenation</summary>
/// <remarks>must be positive</remarks>
[ParseInfo(3, units: "Pa")]
public double Ko { get; set; }
/// <summary>the fraction of glycolate carbon not returned to the chloroplast</summary>
/// <remarks>must be between 0~1 if provided</remarks>
[ParseInfo(4)]
public double Alpha { get; set; }
/// <summary>dark respiration</summary>
/// <remarks>must be positive if provided</remarks>
[ParseInfo(5, units: "umol/m2/s")]
public double Rd { get; set; }
/// <summary>internal (also known as mesophyll) conductance</summary>
[ParseInfo(6, units: "umol/m2/s/Pa")]
public double gi { get; set; }
public virtual LeafInput LeafInput { get; set; }
}
}
+96
View File
@@ -0,0 +1,96 @@
using LeafWeb.Core.Services;
namespace LeafWeb.Core.Models
{
/// <summary>
/// Contains info about the site such as elevation, canopy height, site ID, etc
/// </summary>
public class LeafInputSite
{
/// <summary>Site identifier</summary>
/// <remarks>do not leave blank between letters</remarks>
[ParseInfo(1)]
public string SiteID { get; set; }
/// <summary>Site latitude, northern hermisphere positive</summary>
[ParseInfo(2, units:"degrees")]
public double? Latitude { get; set; }
/// <summary>Site longitude, east positive</summary>
[ParseInfo(3, units: "degrees")]
public double? Longitude { get; set; }
/// <summary>site elevation</summary>
[ParseInfo(4, units: "m")]
public double? Elevation { get; set; }
/// <summary>the year when the A/Ci data is taken</summary>
[ParseInfo(5, units: "year")]
public int? SampleYear { get; set; }
/// <summary>the day of year (since 1 Jan) when the A/Ci data is taken</summary>
[ParseInfo(6, units: "day")]
public int? SampleDayOfYear { get; set; }
/// <summary>the approximate start day (since 1 Jan) of growing season</summary>
[ParseInfo(7, units: "day")]
public int? GrowSeasonStart { get; set; }
/// <summary>the approximate end day (since 1 Jan) of growing season</summary>
[ParseInfo(8, units: "day")]
public int? GrowSeasonEnd { get; set; }
/// <summary>stand age since the last disturbance</summary>
[ParseInfo(9, units: "year")]
public double? StandAge { get; set; }
/// <summary>the height of the canopy</summary>
[ParseInfo(10, units: "m")]
public double? CanopyHeight { get; set; }
/// <summary>the leaf area index in the middle of growing season</summary>
[ParseInfo(11, units: "m2/m2")]
public double? LeafAreaIndex { get; set; }
/// <summary>the species of the leaf sample</summary>
/// <remarks>don't leave blank between letters</remarks>
[ParseInfo(12, units: "dimensionless")]
public string SpeciesSampled { get; set; }
/// <summary>the average time interval between two consecutive A/Ci data points</summary>
[ParseInfo(13, alternateTitle: "AveTimeResolution", units: "minutes")]
public double? AverageTimeResolution { get; set; }
/// <summary>the height at which the leaf is located</summary>
[ParseInfo(14, units: "m")]
public double? SampleHeight { get; set; }
/// <summary>the age of the leaf</summary>
[ParseInfo(15, units: "day")]
public int? LeafAge { get; set; }
/// <summary>specific leaf area of the sample</summary>
[ParseInfo(16, units: "cm2/g")]
public double? SpecificLeafArea { get; set; }
/// <summary>dry leaf nitrogen content of the sample</summary>
[ParseInfo(17, units: "%")]
public double? LfNitrogenContent { get; set; }
/// <summary>dry leaf carbon content of the sample</summary>
[ParseInfo(18, units: "%")]
public double? LfCarbonContent { get; set; }
/// <summary>dry leaf phosphorus content of the sample</summary>
[ParseInfo(19, units: "%")]
public double? LfPhosphContent { get; set; }
// WoodPorosity
// SapWoodDensity
// DataType,TissueArea,TissueMass,Fo'_or_Fo,Fm'_or_Fm,Fs,MeasLight
public virtual LeafInput LeafInput { get; set; }
}
}