You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

CSV to Catalog converter is a tool for conversion of a CSV (Comma-Separated Values) file into a Catalog in EPISODES Platform Matlab-based format.

CATEGORY Converters

KEYWORDS Format conversion

CITATION Please acknowledge use of this application in your work: 
IS-EPOS. (2019). Resource Management Applications [Web applications] . Retrieved from https://tcs.ah-epos.eu/

Requirements for input file

The input file to be converted to the EPISODES Platform Matlab-based format should be a valid CSV file, with values separated by commas (',') - see also CSV format specifications, e.g., https://tools.ietf.org/html/rfc4180. The file has to include a header line with names of the columns in the catalog. The numbers within the file should use English locale, the text, if containing special characters (including comma, used for values separation) should be enclosed in double quotes.

Example input file

The excerpt below contains a sample content of a valid input CSV file. It defines 8 catalog columns with two entries. Each entry contains a value for each column, if the value is not specified, it should be left empty (note the double comma in the last line of Excerpt 1) The most popular column names and formats are described in this guide, however, custom columns are also allowed. The time should be written as a single text value with any format, however, this format has to be later specified within the application form (see TODO). 

ID,Time,ML,Mw,Depth,RMS time residual,Hypocenter quality index,Comments
Id001,2014-01-01 00:05:02.017,3,3.5,0.4,1.123,2,"mainshock"
Id002,2014-01-08 00:40:09.136,,4.3,0.5,2.234,1,"aftershock"

Excerpt 1. Sample content of a CSV input file. Note, the empty value (third in the last row) and text values surrounded with double quotes.

Input file specification

The application requires single file of type Catalog in CSV - see also previous section for the input file requirements.

Figure 1. Application input file specification

Filling form values

The application form is generated based on the specific input file - the column names from header line are displayed in the first column (see Figure 2). By default all columns will be present in the result catalog, however, to exclude any of them uncheck the box near to the column name (as marked with (1) in Figure 2). To read the file content correctly, it is required to set the column content type (marked with (2) in Figure 2), so that the program knows how to interpret the subsequent values. If the content type is Date and time, it is also required to set the time format (marked with (3) in Figure 2) to allow correct reading of the time fields. It is also possible to specify a different name for the column in the resulting catalog (by default the name is the same as in the header) or add a description or unit. To set a specific column type (e.g. to specify that a column is a magnitude), use the Column type drop-down list. Additionally, a display format might be added to specify a custom mode of display (e.g. engineering notation), with a help of a wizard (accessible with icon marked with (4) in Figure 2 and options visible in Figure 3).

If the column name from the file header was defined among the standard catalog column names, all of the above properties will be already filled with defaults by the system (rows from ID to Depth in Figure 2). For other values, they have to be specified by the user. 

Figure 2. Application form with most important elements marked.

Figure 3. Wizard used for display format specification

It is advisable that the catalog is always sorted by time, therefore, the form also offers an option to sort the resulting catalog (marked with (5) in Figure 2).

Produced output

The resulting file will have the same name as the input, with only the extension changed to .mat.

Back to top

  • No labels