ReadValues: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This module can be used to read-in values from a tabular organized file. | This module can be used to read-in values from a tabular organized file. | ||
== Supported file formats == | |||
* Text files with ending .txt | * Text files with ending .txt | ||
* Text files with ending .csv | * Text files with ending .csv | ||
* Excel files with ending .xls or .xlsx | * Excel files with ending .xls or .xlsx | ||
== Loading and reading a file == | |||
Files can be loaded using the button 'Load list' or by drag'n'drop of a single file into the area below Values. | Files can be loaded using the button 'Load list' or by drag'n'drop of a single file into the area below Values. | ||
=== Procedure === | |||
* Empty lines are automatically skipped. | |||
* Lines starting with a comment character are skipped as well. | |||
* If desired, the name of the variable and the unit of each column are readin from the first available lines. | |||
* If desired, a certain number of lines can be skipped, e.g. to remove a header. | |||
== User interface == | == User interface == | ||
Line 59: | Line 65: | ||
Changed values will replace the value of the loaded file during a measurement. However, changed values will not permanently saved in the selected file. Thus, the loaded file can be used as a template that can be modified each time before a measurement is done. | Changed values will replace the value of the loaded file during a measurement. However, changed values will not permanently saved in the selected file. Thus, the loaded file can be used as a template that can be modified each time before a measurement is done. | ||
=== Disable lines === | |||
In case you would like to disable lines to not use them during the measurement, we recommend to use the option 'recognize as GUI elements' and add a column of bool values such as 'False' or 'True' to your file. A CheckBox will be displayed for each bool value that can be checked or unchecked. In combination with the module [[Condition]], measurement points can be skipped that have the property 'False' | |||
== Loading SweepMe! data == | == Loading SweepMe! data == |
Revision as of 00:28, 28 April 2019
This module can be used to read-in values from a tabular organized file.
Supported file formats
- Text files with ending .txt
- Text files with ending .csv
- Excel files with ending .xls or .xlsx
Loading and reading a file
Files can be loaded using the button 'Load list' or by drag'n'drop of a single file into the area below Values.
Procedure
- Empty lines are automatically skipped.
- Lines starting with a comment character are skipped as well.
- If desired, the name of the variable and the unit of each column are readin from the first available lines.
- If desired, a certain number of lines can be skipped, e.g. to remove a header.
User interface
Sweep mode
- Each line of file: A single file can be loaded into the module and for each line of your file, the ReadValues module will perform a variation of the modules in the sequencer that are hierarchically below.
has variable
Must be checked if the first non-empty, non-comment line of your file specifies the names of the variables related to each column.
has unit
Only available if 'has variable' is checked. Must be checked if the line after variables indicates the corresponding units.
Delimiter
The character that separates values of each column. It is not needed for excel files.
Comment
Character at the beginning of a line that indicates that this line should be skipped during read-in
Missing data
String that indicates missing data, so that SweepMe! can replace each occurence with a float of 'not-a-number' (nan). Important if data with missing values shall be plotted.
Skip lines
Number of lines that shall be skipped before data is read-in. Empty lines will be automatically skipped.
Preview [lines]
Loading large files can lead to delays that are prevented by showing a preview of the data. Enter the number of lines that you need to make sure that the correct file is loaded and which allows a proper performance.
recognize as GUI elements
If checked, the content of your file will displayed as CheckBox or ComboBox if certain patterns are matched:
- CheckBox: The entry is 'False' or 'True'
- ComboBox: The entry is separaed by '|'
use '^' to copy cell above
If checked, each cell containing a '^' character will get the value of the cell above. Thus, adjacent cell in vertical direction can be related to each other.
editable
If checked, loaded values can be usd as template to modify them before a measurement is done. Please read the section 'Editing values' for further information.
Preview mode
Large files can lead to delays in the program response. For that reason, a preview of typical 100 lines is shown. If your file has more than shown in the preview they will still be used during the measurement. Adjust the option 'Preview [lines]' if you need to see all lines of your file.
Editing values
Editing of values is possible if
- SweepMode is 'Each line of file'
- The entire file is shown, i.e. no preview mode is used
- The option 'editable' is checked.
Changed values will replace the value of the loaded file during a measurement. However, changed values will not permanently saved in the selected file. Thus, the loaded file can be used as a template that can be modified each time before a measurement is done.
Disable lines
In case you would like to disable lines to not use them during the measurement, we recommend to use the option 'recognize as GUI elements' and add a column of bool values such as 'False' or 'True' to your file. A CheckBox will be displayed for each bool value that can be checked or unchecked. In combination with the module Condition, measurement points can be skipped that have the property 'False'
Loading SweepMe! data
Data that was previously been measured with SweepMe! can easily be loaded again with ReadValues. The preset options are already adjusted for that purpose.