Test controller, export popup
This popup is used to export data. The export function do not change the actual format of the file, but can change the format of the data and filter the data in various ways.
Contents
Areas
Table columns
Exported
New name
Format
Samples
Final Data
Reduction
Save format
Export
Scripting
Main page
Areas
The popup shows all the table columns and it is possible to adjust what columns to include and their name and format, in addition it is possible to filter the data.
Table columns
This column list all the columns in the table and their sequence. It is possible to move columns up/down with ctrl-up and ctrl-down key presses.
Exported
All columns with a check mark here will be included in the exported file.
New name
When this field is empty the column name will be used for the exported column, typing any name here will change the exported column name to this name.
Changing names also means TestController looses formatting control, if the exported file is loaded renamed columns will use a standard format.
Format
Select data format for the exported columns:
- Full: Use a format with many digits.
- - Full: Change sign of the value and use a format with many digits.
- Display: Use the display format, this will usually loose precision and for digital channels it will use names instead of numbers.
- Custom: Specify a number format, it uses the Java DecimalFormat or Java SimpleDateFormat for dataTime column.
- ymdhms: Only for dataTime column, will show it as a number with year first and seconds last.
- ymd h:m:s: Only for dataTime column, will show date as a number and time in the h:m:s format
- ymd: Only for dataTime column, will only include data as a number, no time.
- h:m:s: Only for dataTime column, will only include times in h:m:s format, no date.
- Short: Only for dataTime column, use system system short date time format.
- System: Only for dataTime column, use system standard date time format.
- Long: Only for dataTime column, use system long date time format.
- Split: Only for dataTime & digital column, will split date and time into separate columns and split columns with multiple digital values into separate columns
- Split system: Only for dataTime column, will split date and time into separate columns using system format.
- Reindex: Only for index column, will renumber it to start from 0. This is useful when filtering data.
Samples
This defines the start and end row of the exported data, either as second into the data or as index.
Final Data
Show the amount of data to export. The time is from first selected sample to last selected sample.
The Samples is number of samples exported in that time span, this is affected by the reduction selected.
Reduction
It is not always all the data is needed when exporting, with these function it is possible to reduce the data.
Export all data.
Pick a sample at regular interval to export.
This method will often include short spikes in the data and may generate interference patterns.
Each exported value is an average of the samples for that position.
This method will smooth data and hide short spikes.
Export first and last sample, other values is only exported if they are significant (Defined by the value) different from the last exported sample.
This is a very efficient way to compact data and still be able to draw a fairly precise curve of the data.
Only export data when the expression is non-zero (i.e. boolean true).
This method may not represent the original data in a truthful way, but it depends on the expression used.
Save format
If the same export format need to be used multiple times it can be saved and reloaded.
This requires the columns are the same in the table to work fully.
Export
Data is usually exported to a .csv file with the "Export data" button, as usually it is possible to select the format (,; ., TAB) of the file.
It is also possible to directly reimport the data into TestController by using "To table". This will save the data to a temporary file and the load that file (This function is disabled when incompatible formats are selected). Using this function will destroy the original data if they are not already saved to a file.
Scripting
The export can be controlled with (Commands will not open the popup):
#EXPORTINIT
#EXPORTCOLUMNS columnName{ columnName{ columnName{ ...}}}
#EXPORTCOLUMNSEXCLUDE columnName{ columnName{ columnName{ ...}}}
#LOADEXPORTFORMAT filename
#EXPORTREDUCE format {param1{ param2}}
#EXPORTTABLE filename {format}
#EXPORTTABLERELOAD
It is possible to generate the required commands for a export by configuring it in the popup, close the popup without exporting any data, then right click in the log window and select "Generate scripts, Export script".