Wave project file: Difference between revisions

From BlueM
Jump to navigation Jump to search
mNo edit summary
(custom import settings (#720))
Line 3: Line 3:
A '''Wave project file''' (<code>*.wvp</code>) is a text file that can be used to quickly load multiple series from multiple files at once.
A '''Wave project file''' (<code>*.wvp</code>) is a text file that can be used to quickly load multiple series from multiple files at once.


The format is as follows:
The basic format is as follows:
<pre>
<pre>
file=path\to\file1
file=path\to\file1
Line 13: Line 13:
</pre>
</pre>


Example:
==Example==
This is a basic example that loads multiple series from multiple different files of different types:
<pre>
<pre>
# Test all file types
# Read multiple file types
#--------------------
#-------------------------
file=REG_SMUSI\N74235_Mue_10aV2.reg
file=REG_SMUSI\N74235_Mue_10aV2.reg
file=UVF\42960.0_q_28.uvf
file=UVF\42960.0_q_28.uvf
Line 30: Line 31:
</pre>
</pre>


'''Notes:'''
==Custom import settings==
It is also possible to specify custom import settings. This is useful for generic text or csv files.
 
Example with all possible settings:
<pre>
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
</pre>
 
The accepted import settings are described below:
* <code>isColumnSeparated</code>: whether the columns are separated by a character (<code>True</code>) or are fixed width (<code>False</code>). Default: <code>True</code>
* <code>separator</code>: the column separator (only relevant if <code>isColumnSeparated=True</code>). Default: <code>;</code>
* <code>columnWidth</code>: the column width (only relevant if <code>isColumnSeparated=False</code>). Default: <code>16</code>
* <code>dateformat</code>: the date format (see [https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings help]). Default: <code>dd.MM.yyyy HH:mm</code>
* <code>decimalSeparator</code>: the decimal separator for numbers. Default: <code>.</code>
* <code>iLineHeadings</code>: the number of the line containing the headings. Default: <code>1</code>
* <code>iLineUnits</code>: the number of the line containing the units. Default: <code>2</code>
* <code>iLineData</code>: the number of the first line of data. Default: <code>3</code>
* <code>useUnits</code>: whether to read units from the file. Default: <code>True</code>
* <code>dateTimeColumnIndex</code>: The 0-based index of the column containing date time values. Default: <code>0</code>
 
==Notes==
* all whitespace apart from linebreaks in the project file is optional
* the path to the file can be specified as an absolute path or as a relative path (relative to the project file)
* the path to the file can be specified as an absolute path or as a relative path (relative to the project file)
* if no series are specified, all series contained in the file will be loaded
* if a file is specified without specifying which series should be imported, all series contained in the file will be imported
* all whitespace in the project file is optional (apart from linebreaks)
* lines starting with <code>#</code> are ignored (treated as comments)
* lines not starting whith <code>file=</code> or <code>series=</code> are ignored (useful for adding comments)
* support for this file was added in v1.6.1 (r445)
* support for this file was added in v1.6.1 (r445)
* support for specifying custom import settings was added in v1.6.2 (r481)


[[Category:BlueM.Wave]]
[[Category:BlueM.Wave]]

Revision as of 01:00, 15 September 2018

Wave.png Wave | Development

A Wave project file (*.wvp) is a text file that can be used to quickly load multiple series from multiple files at once.

The basic format is as follows:

file=path\to\file1
 series=series1
 series=series2: optional title
file=path\to\file2
 series=series3: optional title
 series=series4

Example

This is a basic example that loads multiple series from multiple different files of different types:

# Read multiple file types
#-------------------------
file=REG_SMUSI\N74235_Mue_10aV2.reg
file=UVF\42960.0_q_28.uvf
file=WEL\DEMONA_PSI.wel
 series=S3  _1AB: "S3_1AB"
 series=S3  _1ZU: "S3_1ZU"
file=WEL_GISMO\BEK_WEL.asc
 series=BEK_NH4Bek: "NH4 concentration"
file=WEL_TALSIM\TALSIM.wel
 series=S103_1AB
file=ZRE\Olef_Zufl_gem.zre
file=ZRXP\Q2.1440.zrx

Custom import settings

It is also possible to specify custom import settings. 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 if isColumnSeparated=True). Default: ;
  • columnWidth: the column width (only relevant if isColumnSeparated=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
  • the path to the file can be specified as an absolute path or as a relative path (relative to the project file)
  • if a file is specified without specifying which series should be imported, all series contained in the file will be imported
  • lines starting with # are ignored (treated as comments)
  • support for this file was added in v1.6.1 (r445)
  • support for specifying custom import settings was added in v1.6.2 (r481)