diff --git a/source/Analysis/GoodnessOfFit.vb b/source/Analysis/GoodnessOfFit.vb index 31c4a131..1d53355e 100644 --- a/source/Analysis/GoodnessOfFit.vb +++ b/source/Analysis/GoodnessOfFit.vb @@ -90,15 +90,23 @@ Friend Class GoodnessOfFit End Get End Property - Public Sub New(ByRef zeitreihen As List(Of TimeSeries)) + Public Sub New(ByRef seriesList As List(Of TimeSeries)) - Call MyBase.New(zeitreihen) + Call MyBase.New(seriesList) - 'Prüfung: Anzahl erwarteter Zeitreihen ist >= 2 - If (zeitreihen.Count < 2) Then + 'number of time series must be at least 2 + If seriesList.Count < 2 Then Throw New Exception("The Goodness of Fit analysis requires the selection of at least 2 time series!") End If + 'emit a warning if any time series has a volume of NaN + For Each ts As TimeSeries In seriesList + If Double.IsNaN(ts.Volume) Then + Log.AddLogEntry(levels.warning, "At least one time series has a volume of NaN, volume error can not be calculated!") + Exit For + End If + Next + 'Instantiate result structure Me.GoFResults = New Dictionary(Of String, Dictionary(Of String, GoF)) diff --git a/source/CHANGELOG.md b/source/CHANGELOG.md index 3c978b0a..18e7c214 100644 --- a/source/CHANGELOG.md +++ b/source/CHANGELOG.md @@ -5,6 +5,7 @@ Development ------------- NEW: * Added an error text in the Time Series Properties window when a time series' volume is NaN +* Added a warning log message when executing the Goodness Of Fit analysis with time series whose volume is NaN FIXED: * Fixed superfluous metadata in export to ZRXP format #126