Exemplo n.º 1
0
 /// <summary>
 /// Constructor to create the chromophore spectrum
 /// </summary>
 /// <param name="wavelengths">A list of wavelengths</param>
 /// <param name="spectrum">A list of spectral values</param>
 /// <param name="name">The name of the chromophore absorber</param>
 /// <param name="coeffType">The chromophore coefficient type</param>
 /// <param name="absUnits">The absorption coefficient units</param>
 /// <param name="molarUnit">The molar units</param>
 /// <param name="wavelengthUnit">The wavelength units</param>
 public ChromophoreSpectrum(List <double> wavelengths, List <double> spectrum, string name, ChromophoreCoefficientType coeffType, AbsorptionCoefficientUnit absUnits, MolarUnit molarUnit, WavelengthUnit wavelengthUnit)
 {
     ChromophoreCoefficientType = coeffType;
     AbsorptionCoefficientUnit  = absUnits;
     WavelengthUnit             = wavelengthUnit;
     MolarUnit   = molarUnit;
     Name        = name;
     Spectrum    = spectrum;
     Wavelengths = wavelengths;
 }
Exemplo n.º 2
0
        /// <summary>
        /// passes an enum of WavelengthUnit and returns a string of wavelength unit
        /// </summary>
        /// <param name="wavelengthUnit">enum of type WavelengthUnit</param>
        /// <returns>string representing wavelength unit</returns>
        public static string getWavelengthUnit(WavelengthUnit wavelengthUnit)
        {
            switch (wavelengthUnit)
            {
            case WavelengthUnit.InverseCentimeters:
                return("1/cm");

            case WavelengthUnit.Nanometers:
                return("nm");

            case WavelengthUnit.Micrometers:
                return("um");

            case WavelengthUnit.Meters:
                return("m");

            case WavelengthUnit.InverseMeters:
                return("1/m");

            default:
                throw new Exception("Unknown wavelength unit");
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Constructor to create the chromophore spectrum starting with empty lists
 /// </summary>
 /// <param name="name">The name of the chromophore absorber</param>
 /// <param name="coeffType">The chromophore coefficient type</param>
 /// <param name="absUnits">The absorption coefficient units</param>
 /// <param name="molarUnit">The molar units</param>
 /// <param name="wavelengthUnit">The wavelength units</param>
 public ChromophoreSpectrum(string name, ChromophoreCoefficientType coeffType, AbsorptionCoefficientUnit absUnits, MolarUnit molarUnit, WavelengthUnit wavelengthUnit)
     : this(new List <double>(), new List <double>(), name, coeffType, absUnits, molarUnit, wavelengthUnit)
 {
 }