Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1759 correcting build #1760

Merged
merged 1 commit into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/OSPSuite.Assets/UIConstants.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;
using OSPSuite.Assets.Extensions;
using OSPSuite.Utility.Extensions;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using OSPSuite.Assets.Extensions;
using OSPSuite.Utility.Extensions;

namespace OSPSuite.Assets
{
Expand Down Expand Up @@ -937,10 +937,6 @@ public static class ParameterIdentification
public static readonly string TimeProfileConfidenceIntervalAnalysis = "Confidence Interval";
public static readonly string TimeProfileVPCIntervalAnalysis = "Visual Predictive Check Interval";

public static string DeviationLineNameUpper(float foldValue) => $"{foldValue}-fold deviation";

public static string DeviationLineNameLower(float foldValue) => $"{foldValue}-fold deviation Lower";

public static string FeedbackViewFor(string parameterIdentificationName)
{
return $"{FeedbackView} for {parameterIdentificationName}";
Expand Down Expand Up @@ -1323,6 +1319,9 @@ public static class DeviationLines
{
public static string SpecifyFoldValue = "Specify deviation fold value";
public static string DeviationLineDescription = "Will create two deviation lines according to the given fold value which has to be greater than 1 (foldValue >1). An x-fold deviation range includes simulated values within x-fold and 1/x-fold of observed values.";
public static string DeviationLineNameUpper(float foldValue) => $"{foldValue}-fold deviation";
public static string DeviationLineNameLower(float foldValue) => $"{foldValue}-fold deviation Lower";

}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/OSPSuite.Core/Services/PredictedVsObservedChartService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public IEnumerable<DataRepository> AddDeviationLine(float foldValue, List<DataCo
chart.AddCurvesFor(repository, x => x.Name, _dimensionFactory, (column, curve) => curve.UpdateDeviationCurve(column.Name, deviationLinesCount)));

//adding one of the deviation lines to the legend. Workaround for now until the presenter is adjusted for Predicted vs. Observed Chart.
var upperDeviationLine = chart.Curves.FindByName(Captions.PredictedVsObserved.DeviationLineNameUpper(foldValue));
var upperDeviationLine = chart.Curves.FindByName(Captions.Chart.DeviationLines.DeviationLineNameUpper(foldValue));
if (upperDeviationLine != null)
upperDeviationLine.VisibleInLegend = true;

Expand Down Expand Up @@ -191,7 +191,7 @@ private DataRepository createRepositoryBasedOnSettings(float foldValue, IDimensi
Values = new List<float>() {identityMinimum, identityMaximum}
};

var valuesUpper = new DataColumn(Captions.ParameterIdentification.DeviationLineNameUpper(foldValue), mergedDimension,
var valuesUpper = new DataColumn(Captions.Chart.DeviationLines.DeviationLineNameUpper(foldValue), mergedDimension,
baseGridDeviation)
{
Values = new List<float>()
Expand All @@ -203,7 +203,7 @@ private DataRepository createRepositoryBasedOnSettings(float foldValue, IDimensi
};
deviationDataRepository.Add(valuesUpper);

var valuesLower = new DataColumn(Captions.ParameterIdentification.DeviationLineNameLower(foldValue), mergedDimension,
var valuesLower = new DataColumn(Captions.Chart.DeviationLines.DeviationLineNameLower(foldValue), mergedDimension,
baseGridDeviation)
{
Values = new List<float>() {identityMinimum / foldValue, identityMaximum / foldValue},
Expand Down