THIS 22.1

CSV

CSV

The CSV menu (see right) can be used to read comma separated variable file(s) into T/HIS. This menu allows to read single CSV file or all the CSV files in a selected directory both recursively and non-recursively.

Each file may contain up to 1000 columns of data (separated by commas).

The maximum line length supported by this option is 10240 characters.

CSV files written from the D3PLOT Write Menu are automatically detected by T/HIS and sets the appropriate read options. The options can be changed, but the data may not read in as expected. Both the Write->Entity and Write->Scan formats are supported. The first column of data containing the entity IDs is ignored for both formats. For files written from the Write->Scan menu the third column is ignored as this also contains entity IDs.

The CSV menu can also read in multiple CSV files in a given directory and also all the sub-directories recursively by changing the Open option from CSV File to either CSV Directory or CSV Directory (Recursive).
For both CSV Directory and CSV Directory (Recursive) options, CSV menu first scans through the directory and specifies the number of files it has found. By default all the files found will be selected. Users can filter out the files they want to read by clicking on the Select button.






On clicking the Select button, CSV menu will display the list of all the CSV files found in the specified directory. Users can select which CSV files they would like to read in.
File Format This option can be used to change the CSV file format between the X,Y,X,Y,X,Y format where alternate columns are the X and Y values for each curve and the X,Y,Y,Y format where there is a single column containing the x-axis values for all the curves.
Field Separator By default T/HIS assumes that the columns of data are separated by commas, this option can be used to change the field separator to either a Tab or Spaces. If the 'Space' option is used then multiple spaces are counted as a single field separator. If curve or axis labels are defined in the file and they contain spaces then they need to be enclosed in pairs of " quotes. The default field separator can specified in the preference file (see Format of the oa_pref File for more details) this*csv_separator:

Read X Values
This option can be used to specify a column within the file that contains the X-axis data values that should be used for all of the other columns of data.

Generate X Values
This option can be used to automatically generate the X-axis values if none of the columns within the file contain the data.

Read Labels
This option can be used to specify a row within the file that contains labels for each of the columns of data that can be used as the curve labels within T/HIS.
Generate Labels

This option can be used to automatically generate labels for each set of data. A single string can be specified which will then have the column number appended to it to generate unique labels.
Read Axis Labels This option can be used to specify a row within the file that contains the axis labels.
Curve Unit System

This option can be used to set the units system for the curves read from the CSV file. If a units system is defined in the CSV file itself, then T/HIS applies that units system to the curves. Otherwise, the units system selected from this dropdown is applied to the curves read in from the file. Defining the units system when reading curves enables T/HIS to scale any constants in subsequent curve operations correctly.