private void PlotFit(PoolParameters poolParams, string label, double kbi = 1000000) //default kbi is just a very high number to simulate instantaneous turnover (proxy for the available amino acid pool) { double[] timepoints = new double[1000]; for (int i = 0; i < timepoints.Length; i++) { timepoints[i] = i / 10.0; } //half-life = ln(2)/kbt, make half life 0, kbt = infinity double[] rfs = NonLinearRegression.PredictRelativeFractionUsingThreeCompartmentModel(poolParams.Kst, poolParams.Kbt, poolParams.Kao, kbi, timepoints); Dispatcher.Invoke(() => { RatioComparisonPlot.plt.Layout(titleHeight: 20, xLabelHeight: 40, y2LabelWidth: 20); RatioComparisonPlot.plt.XLabel("Time (Days)", fontSize: 20); // RatioComparisonPlot.plt.YLabel("Relative Fraction (Lys0/Total)", fontSize: 20); RatioComparisonPlot.plt.YLabel("Lys0 / LysTotal", fontSize: 20); RatioComparisonPlot.plt.Axis(0, 100, 0, 1); RatioComparisonPlot.plt.Ticks(fontSize: 18); RatioComparisonPlot.plt.PlotScatter(timepoints, rfs, label: label, markerShape: ScottPlot.MarkerShape.none); if (DisplayLegendCheckBox.IsChecked.Value) { RatioComparisonPlot.plt.Legend(); } RatioComparisonPlot.Render(); }); }
public MainWindow() { InitializeComponent(); dataGridPeptideFiles.DataContext = DataFilesObservableCollection; dataGridDatabaseFiles.DataContext = DatabasesObservableCollection; DisplayedSamplesDataGrid.DataContext = FilesToDisplayObservableCollection; HiddenSamplesDataGrid.DataContext = FilesToHideObservableCollection; DisplayAnalyzedFilesDataGrid.DataContext = DataFilesObservableCollection; HalfLifeHistogramPlot.Configure(enableScrollWheelZoom: false); PrecisionPlot.Configure(enableScrollWheelZoom: false); HalfLifeComparisonPlot.Configure(enableScrollWheelZoom: false); RatioComparisonPlot.Configure(enableScrollWheelZoom: false); peptideRadioButton.IsChecked = true; proteinSpecificRadioButton.IsChecked = DisplayProteinInSpecificTable; DisplayPeptidesView = CollectionViewSource.GetDefaultView(PeptidesToDisplay); DisplayPeptidesDataGrid.DataContext = DisplayPeptidesView; Loaders.LoadElements(); PopulateChoices(); }