Skip to content

Commit

Permalink
emit a warning if any time series has a volume of NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
jamaa committed Nov 19, 2023
1 parent 28cfaf8 commit 69c61af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
16 changes: 12 additions & 4 deletions source/Analysis/GoodnessOfFit.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
1 change: 1 addition & 0 deletions source/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 69c61af

Please sign in to comment.