ASCII Data Format

 

The Data Format tab establishes the link between data in the import file and the project database.  

Data record

Once a file is selected on the Import File tab, the “Data Record” window on the bottom of the screen shows a portion of the selected file.  This section displays two consecutive data records.  You can scroll through the record window with the up and down arrows on the right side of the screen. You can also scroll left or right through the record with the scroll bar at the bottom of the record window.

Number of Records Per Well

Sets the number of data records pertaining to a single well.

Records to Skip Before 1st Well

Skips header or comment lines at the beginning of the data file.  Click the "Set Skip" button to set the number of skipped records based on the record currently in the data record window.

Field Definitions

Select the appropriate file format on the File Format dropdown.  Recall that this tool can either use tabular (fixed column) or comma/tilde-delimited type ASCII data file.  Columnar files separate different data entries with empty space.  Comma- and tilde-delimited files, on the other hand, separate different data entries with characters.  Petra distinguishes between different entries on a row with specific start and stop column numbers.

To add a field definition for a comma- or tilde-delimited file, select the desired field in the Data Record window.  Note that Petra counts the number of commas to establish a Field Number.  Next, select the relevant data type on the set of dropdown menus on the right.  Select the  “+” add button to add the definition to the "Field Definitions" list box.

To add a field definition for a columnar file, swipe relevant data field on the Data Record window.  Note that Petra fills in the “Start Column” and “End Column.”   Next, select the relevant data type on the set of dropdown menus on the right.  Select the “+” add button to add the definition to the "Field Definitions" list box.

In both cases, to modify a field definition, use the replace button to replace the currently selected field definition with the selected entry on the import file and data type.  To drop a field from the list, select the desired definition and select the “-“drop button. 

"Implied Decimal Places" – This option scales imported values by multiples of 10.   As an example, a 1 here will divide the incoming data by 10 and a 2 will divide the incoming data by 100.  This is useful for changing values expressed as percentages (1-100%) into values expressed as decimals (0-1).

Saving / Loading field definition templates

Since creating a long list of field definitions can be tedious, it’s a good idea to save your work.   Petra can save these column and field definitions as a template “Format File” with a *.FMI extension.  By default, Petra stores template files to the private parms directory.  To save a field definition template file, select the Save button.  To load a pre-existing format template, select the Load button.