public override void SaveParamsForReport() { ReportGenerator g = ReportGenerator.Instance; g.ClearReflModelInfo(); int arrayconst = 2; List <string> ginfo = new List <string>(); if (HoldsigmaCB) { ginfo.Add("The reflectivity curve was fit with a single roughness parameter\n"); } else { ginfo.Add(String.Format("The reflectivity curve was fit with {0} roughness parameters\n", BoxCountTB + 1)); arrayconst = 3; } ginfo.Add("Percent Error in Q: " + QSpreadTB.ToString() + "\n"); ginfo.Add("Normalization Factor: " + NormalizationFactor.ToString() + "\n"); ginfo.Add("Low Q Offset: " + LowQOffset.ToString() + "\n"); ginfo.Add("High Q Offset: " + HighQOffset.ToString() + "\n"); ginfo.Add("Superphase SLD: " + SubphaseSLDTB.ToString() + "\n"); ginfo.Add("Subphase SLD: " + SubphaseSLD.ToString() + "\n"); ginfo.Add("Wavelength: " + WavelengthTB.ToString() + "\n"); ginfo.Add("Chi Square for reflectivity fit: " + ChiSquare.ToString() + "\n"); ginfo.Add(string.Format("The subphase roughness was: {0:#.### E-0} " + (char)0x00B1 + " {1:#.### E-0}\n", SubRoughTB, CovarArray[0])); for (int i = 0; i < BoxCountTB; i++) { ginfo.Add((i + 1).ToString()); ginfo.Add(LengthArray[i].ToString("#.### E-0") + " " + (char)0x00B1 + " " + CovarArray[arrayconst * i + 1].ToString("#.### E-0")); if (!m_bUseSLD) { ginfo.Add(RhoArray[i].ToString("#.### E-0") + " " + (char)0x00B1 + " " + CovarArray[arrayconst * i + 2].ToString("#.### E-0")); } else { ginfo.Add((RhoArray[i] * SubphaseSLDTB).ToString("#.### E-0") + " " + (char)0x00B1 + " " + (CovarArray[arrayconst * i + 2] * SubphaseSLDTB).ToString("#.### E-0")); } if (HoldsigmaCB) { ginfo.Add(SigmaArray[i].ToString("#.### E-0") + " " + (char)0x00B1 + " " + CovarArray[0].ToString("#.### E-0")); } else { ginfo.Add(SigmaArray[i].ToString("#.### E-0") + " " + (char)0x00B1 + " " + CovarArray[arrayconst * i + 3].ToString("#.### E-0")); } } g.SetReflModelInfo = ginfo; }
public override string ErrorReport() { string output = string.Empty; if (ImpNormCB) { output = (Environment.NewLine + "Normalization factor = " + NormalizationFactor.ToString("#.###") + " " + (char)0x00B1 + " " + CovarArray[CovarArray.Length - 1].ToString("#.### E-0") + Environment.NewLine); } return(ErrorReport(output)); }