Table of Contents

Namespace TimeSeriesAnalysis.Utility

Classes

CSV

IO Utility class for loading time-series data from a plain text comma-separated variable(CSV) file

CsvContent

A class that contains the text content of a csv-file. This class is introduced as a convenience to avoid confusing filenames and csv-content string in overloaded methods.

ParserFeedback

Utility class is responsible for collecting feedback lines, such as warnings,error or info text to either the console window, visual-studio output/debug window, to a file structure or all.

The class makes it easy to switch between displaying output to a console while debugging while to outputting to file when code moves to a server. Suitable for collecting debugging info from services that run many cases repeatedly.

log levels: INFO,WARN,ERROR,FATAL (no debug messages here)

Plot

Static methods for plotting one or more time-series across one or more y-axes and one or more subplots by opening up Chrome calling a set of JavaScript plotting methods based on plotly.js

Time-series are written as CSV-files to a specific folder on disk plotDataPath, before starting a chrome-window that loads a specific "localhost" plotlyURL that reads said CSV-files and initates an in-browser plot using plotly.js.

For this method to work you need to be running a web server such as IIS that serves up a "localhost" plotlyURL as described in the documentation.

If you sometimes need to disable plots (for instance if plotting code is included in unit tests) see Plot4Test

Plot4Test

Version of Plot class where plots code can be Enabled()/Disabled() programatically. This allows you to keep all your "Plot" calls in your unit tests and turn them on as needed to debug a single test, while avoid being overwhelmed with plots if for instance re-running all unit tests.

PlotGain

Make debug plots of the gain of one or more model, especially useful for gain-scheduled or other nonlinear models.

PlotXY

Programatically calls plotly to create an in-browser xy-plot of given input data. A utility class mainly intended for debugging.

SigmaXml

Class that concerns reading the "cache.js" file that Sigma generates, that contains time-series data.

SignificantDigits

Utility class to round double variables to a given nubmer of signficant digits.

StringToFileWriter

IO Utility class to write to file that implements IDisposable interface.

Suggest to use this objects of this class within the using keyword so that file-resources are automatically freed in case your code is terminated before it has completed.

TimeSeriesCreator

Class for static methods create different types of time-series for testing.

UnixTime

Utility class to work with unix time stamps

XYTable

Holds a "table" of x-y value pairs

Structs

ParserFeedbackLogLine

Struct for each log message of ParserFeedback

Enums

ParserfeedbackMessageLevel

Enum to set the log level of ParserFeedback

XYlineType

When plotting an x/y plot, this enum determines if plot is to use markers or line for data points