Wave project file: Difference between revisions
(add note about creating/editing/saving) |
(switch to formatted source) |
||
Line 6: | Line 6: | ||
The basic format is as follows: | The basic format is as follows: | ||
< | <source lang="wvp"> | ||
file=<path\to\file> | file=<path\to\file> | ||
series=<series name> | series=<series name> | ||
Line 13: | Line 13: | ||
series=<series name> | series=<series name> | ||
series=<series name> | series=<series name> | ||
</ | </source> | ||
The <code>file</code> keyword specifies the path to the time series file to import from. The path can be absolute or relative (to the project file). You can specify multiple files. | The <code>file</code> keyword specifies the path to the time series file to import from. The path can be absolute or relative (to the project file). You can specify multiple files. | ||
Line 20: | Line 20: | ||
'''Note:''' If the series name contains a colon (<code>:</code>), the name has to be enclosed in quotes, e.g.: | '''Note:''' If the series name contains a colon (<code>:</code>), the name has to be enclosed in quotes, e.g.: | ||
< | <source lang="wvp"> | ||
series="series:name" | series="series:name" | ||
</ | </source> | ||
==Custom titles== | ==Custom titles== | ||
It is possible to specify custom titles by writing the custom title after a colon (<code>:</code>) behind the series name: | It is possible to specify custom titles by writing the custom title after a colon (<code>:</code>) behind the series name: | ||
< | <source lang="wvp"> | ||
series=<series name>:my custom title | series=<series name>:my custom title | ||
</ | </source> | ||
'''Note:''' If the custom title contains an equal sign (<code>=</code>) or a comma (<code>,</code>), it must be enclosed in quotes, e.g.: | '''Note:''' If the custom title contains an equal sign (<code>=</code>) or a comma (<code>,</code>), it must be enclosed in quotes, e.g.: | ||
< | <source lang="wvp"> | ||
series=<series name>:"my , very = custom title" | series=<series name>:"my , very = custom title" | ||
</ | </source> | ||
==Series options== | ==Series options== | ||
Additional series options can be specified as a list of comma-separated keyword arguments after a colon (<code>:</code>) behind the series name: | Additional series options can be specified as a list of comma-separated keyword arguments after a colon (<code>:</code>) behind the series name: | ||
< | <source lang="wvp"> | ||
series=<series name>:<keyword>=<value>, <keyword>=<value>, ... | series=<series name>:<keyword>=<value>, <keyword>=<value>, ... | ||
</ | </source> | ||
'''Note:''' When using keyword options, any custom title must also be specified using the appropriate <code>title</code> keyword. | '''Note:''' When using keyword options, any custom title must also be specified using the appropriate <code>title</code> keyword. | ||
Line 68: | Line 68: | ||
==Example== | ==Example== | ||
This is a [https://github.com/bluemodel/BlueM.Datasets/blob/master/Wave/WVP/wvp_example.wvp basic example] that loads multiple series from multiple different files of different types: | This is a [https://github.com/bluemodel/BlueM.Datasets/blob/master/Wave/WVP/wvp_example.wvp basic example] that loads multiple series from multiple different files of different types: | ||
< | <source lang="wvp"> | ||
# Import multiple series from multiple files | # Import multiple series from multiple files | ||
#------------------------------------------- | #------------------------------------------- | ||
Line 78: | Line 78: | ||
file=..\BIN\abfluss_1.bin | file=..\BIN\abfluss_1.bin | ||
series=abfluss_1.bin: title="Discharge", unit="m3/s", interpretation=Instantaneous, color=Red, linewidth=4, linestyle=Dash, showPoints=True | series=abfluss_1.bin: title="Discharge", unit="m3/s", interpretation=Instantaneous, color=Red, linewidth=4, linestyle=Dash, showPoints=True | ||
</ | </source> | ||
==Custom file import settings== | ==Custom file import settings== | ||
Line 84: | Line 84: | ||
Example with all possible settings: | Example with all possible settings: | ||
< | <source lang="wvp"> | ||
file=myrandom.csv | file=myrandom.csv | ||
# custom import settings | # custom import settings | ||
Line 100: | Line 100: | ||
series=myseries1 | series=myseries1 | ||
series=myseries2 | series=myseries2 | ||
</ | </source> | ||
The accepted import settings are described below: | The accepted import settings are described below: |
Latest revision as of 06:09, 11 November 2023
Wave | Download | Development
A Wave project file (*.wvp
) is a text file that can be used to quickly load multiple series from multiple files at once. You can create/edit a project file using a text editor or save a project file from within Wave ( Save → Save project file).
The basic format is as follows:
file=<path\to\file> series=<series name> series=<series name> file=<path\to\file> series=<series name> series=<series name>
The file
keyword specifies the path to the time series file to import from. The path can be absolute or relative (to the project file). You can specify multiple files.
The series
keyword specifies the name of the series to import from the file specified above it. You can specify multiple series per file. If none are specified, all series contained in the file are imported.
Note: If the series name contains a colon (:
), the name has to be enclosed in quotes, e.g.:
series="series:name"
Custom titles
It is possible to specify custom titles by writing the custom title after a colon (:
) behind the series name:
series=<series name>:my custom title
Note: If the custom title contains an equal sign (=
) or a comma (,
), it must be enclosed in quotes, e.g.:
series=<series name>:"my , very = custom title"
Series options
Additional series options can be specified as a list of comma-separated keyword arguments after a colon (:
) behind the series name:
series=<series name>:<keyword>=<value>, <keyword>=<value>, ...
Note: When using keyword options, any custom title must also be specified using the appropriate title
keyword.
The following keywords are supported:
title
: assigns a custom titleunit
: assigns the specified unitinterpretation
: assigns the specified interpretation, must be the name of one of the members ofBlueM.Wave.TimeSeries.InterpretationEnum
, possible values:Instantaneous
BlockRight
BlockLeft
Cumulative
CumulativePerTimestep
Undefined
color
: assigns the specified color, can be the name of one of the members ofSystem.Drawing.KnownColor
(e.g.Red
) or a hexadecimal representation of ARGB values (e.g.ffff0000
)linewidth
: assigns the specified line width (default is2
)linestyle
: assigns the specified line style, must be the name of one of the members ofSystem.Drawing.Drawing2D.DashStyle
, possible values:Solid
(default)Dash
Dot
DashDot
DashDotDot
showpoints
: whether to display series points, must beTrue
orFalse
, default isFalse
Notes:
- Keywords can be specified in any order and are not case-sensitive
- Values are case-sensitive and must be enclosed in quotes if they contain an equal sign (
=
) or a comma (,
)
Example
This is a basic example that loads multiple series from multiple different files of different types:
# Import multiple series from multiple files #------------------------------------------- file=..\UVF\42960.0_q_28.uvf file=..\WEL\DEMONA_PSI.wel series=S3 _1AB: S3 outflow series=S3 _1ZU: S3 inflow file=..\ZRE\Zufl_gem.zre file=..\BIN\abfluss_1.bin series=abfluss_1.bin: title="Discharge", unit="m3/s", interpretation=Instantaneous, color=Red, linewidth=4, linestyle=Dash, showPoints=True
Custom file import settings
It is also possible to specify custom import settings for a file. This is useful for generic text or csv files.
Example with all possible settings:
file=myrandom.csv # custom import settings isColumnSeparated=True separator=; dateformat=dd.MM.yyyy HH:mm:ss decimalSeparator=, iLineHeadings=1 iLineUnits=8 iLineData=12 useUnits=True columnWidth= dateTimeColumnIndex=0 # series to import series=myseries1 series=myseries2
The accepted import settings are described below:
isColumnSeparated
: whether the columns are separated by a character (True
) or are fixed width (False
). Default:True
separator
: the column separator (only relevant ifisColumnSeparated=True
). Default:;
, possible values:space
,tab
,,
, or any other single-character stringcolumnWidth
: the column width (only relevant ifisColumnSeparated=False
). Default:16
dateformat
: the date format (see help). Default:dd.MM.yyyy HH:mm
decimalSeparator
: the decimal separator for numbers. Default:.
iLineHeadings
: the number of the line containing the headings. Default:1
iLineUnits
: the number of the line containing the units. Default:2
iLineData
: the number of the first line of data. Default:3
useUnits
: whether to read units from the file. Default:True
dateTimeColumnIndex
: The 0-based index of the column containing date time values. Default:0
Notes
- all whitespace apart from linebreaks in the project file is optional
- lines starting with
#
are ignored (treated as comments) - support for this file was added in v1.6.1 (r445)
- support for specifying custom file import settings was added in v1.6.2 (r481)
- support for keyword options was added in v2.6.0