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; }
private void UpdateReportParameters() { ReportGenerator g = ReportGenerator.Instance; //Record the parameters g.ClearMainInformation(); if (TitleTB.Text.Length > 0) { g.SetMainInformation = TitleTB.Text; } g.SetMainInformation = (String.Format("Surface SLD: {0}\n", Rholipid.Text)); g.SetMainInformation = (String.Format("Surface layer height: {0}\n", layerlength.Text)); if (UseAbsCB.Checked) { g.SetMainInformation = String.Format("Surface layer absoption: {0}\n", SurfAbs.Text); } else { g.SetMainInformation = "The surface layer was treated as transparent\n"; } g.SetMainInformation = (String.Format("Superphase SLD: {0}\n", SupSLDTB.Text)); if (UseAbsCB.Checked) { g.SetMainInformation = String.Format("Superphase absorption: {0}\n", SupAbsTB.Text); } else { g.SetMainInformation = "The superphase layer was treated as transparent\n"; } g.SetMainInformation = (String.Format("Subphase SLD: {0}\n", SubSLDTB.Text)); if (UseAbsCB.Checked) { g.SetMainInformation = String.Format("Subphase absoption: {0}\n", SubAbs.Text); } else { g.SetMainInformation = "The surface layer was treated as transparent\n"; } g.SetMainInformation = "\n"; g.SetMainInformation = String.Format("Number of layers in the reflectivity: {0}\n", Boxlayers.Text); g.SetMainInformation = String.Format("Iterations completed: {0}\n", string.Format("{0}", progressBar1.Value * 80)); g.SetMainInformation = String.Format("Critical edge offset: {0}\n", critedgeoffTB.Text); g.SetMainInformation = String.Format("High Q offset: {0}\n", HQoffsetTB.Text); g.SetMainInformation = String.Format("Roughness Search Percentage: {0} %\n", SigmaSearchTB.Text); g.SetMainInformation = String.Format("X-ray wavelength: {0}\n", wavelength.Text); g.SetMainInformation = String.Format("Percent error in Q: {0}\n", QErrTB.Text); if (ImpNormCB.Checked) { g.SetMainInformation = "The normalization constant was allowed to vary\n"; } if (ForceNormCB.Checked) { g.SetMainInformation = "Normalization of the curve was forced\n"; } g.SetMainInformation = String.Format("Fit Score for the reflectivity: {0}\n", FitScoreTB.Text); g.SetMainInformation = String.Format("Chi Square for the reflectivity: {0}\n", ChiSquareTB.Text); }
public override void SaveParamsForReport() { ReportGenerator g = ReportGenerator.Instance; g.ClearRhoModelInfo(); List <string> info = new List <string>(); if (HoldsigmaCB) { if (!m_bUseSLD) { info.Add("The electron density profile was fit with a single roughness parameter\n"); } else { info.Add("The SLD profile was fit with a single roughness parameter\n"); } } else { if (!m_bUseSLD) { info.Add(String.Format("The electron density profile was fit with {0} roughness parameters\n", (BoxCountTB + 1))); } else { info.Add(String.Format("The SLD profile was fit with {0} roughness parameters\n", (BoxCountTB + 1))); } } info.Add(string.Format("Chi Square: " + ChiSquare + "\n")); info.Add(string.Format("The subphase roughness was: {0:#.### E-0} " + (char)0x00B1 + " {1:#.### E-0}\n", SubRoughTB, CovarArray[0])); int offset = 0; if (!HoldsigmaCB) { offset = 1; } for (int i = 0; i < BoxCountTB; i++) { info.Add((i + 1).ToString()); info.Add(LengthArray[i].ToString("#.### E-0") + " " + (char)0x00B1 + " " + CovarArray[(2 + offset) * i + 1].ToString("#.### E-0")); if (!m_bUseSLD) { info.Add(RhoArray[i].ToString("#.### E-0") + " " + (char)0x00B1 + " " + CovarArray[(2 + offset) * i + 2].ToString("#.### E-0")); } else { info.Add((RhoArray[i]).ToString("#.### E-0") + " " + (char)0x00B1 + " " + (CovarArray[(2 + offset) * i + 2]).ToString("#.### E-0")); } if (HoldsigmaCB) { info.Add(SigmaArray[i].ToString("#.### E-0") + " " + (char)0x00B1 + " " + CovarArray[0].ToString("#.### E-0")); } else { info.Add(SigmaArray[i].ToString("#.### E-0") + " " + (char)0x00B1 + " " + CovarArray[3 * i + 3].ToString("#.### E-0")); } } g.SetRhoModelInfo = info; }