impasc - Import 1-D, 2-D, or 3-D ASCII data

SYNOPSIS

impasc  [ parameter=value ... ]  [ inputfile outputfile ]
impasc  [ parameter=value ... ]  [ inputfile ... directory ]

Parameters are: dim_sizes, dim_names, var_names, var_units, var_types, var_badvals, var_fields, fields_per_var, delimeter.

DESCRIPTION

impasc produces TeraScan datasets from free format ASCII files. impasc can import 1-D, 2-D or 3-D data. Several variables can be imported at once; each variable must have the same dimensions. In order to import variables with different dimensions, impasc must be run more than once; the resulting datasets must then be combined using the assemble function.

PARAMETERS

dim_sizes

Specifies the list of dimension sizes. Valid responses are one, two, or three positive integers. There is no default.

dim_names

Specifies the list of dimension names. Each name can be at most 31 characters long. If the number of dimensions is one, the default is [points]. If the number of dimensions is two, the default is [line sample]. Otherwise the default is [x y z].

var_names

Specifies a list of up to 64 variable names. Each name can be at most 31 characters long. There is no default.

var_units

Specifies the units for each imported variable. Each units' name can be at most 31 characters long. The default for each variable is -, which means no units. The following units are understood by impasc:

 units          converted to

yyyymmdd         std_date
yyyy/mm/dd       std_date
yyyyddd          std_date
yyyy.ddd         std_date
yymmdd           std_date
yy/mm/dd         std_date
yyddd            std_date
yy.ddd           std_date

hhmmss           std_time
hh:mm:ss         std_time

latmmssh         std_latitude
lonmmssh         std_longitude

Times are always assumed to be GMT.

var_types

Specifies the datatype for each imported variable. Types can be one of the following:

byte          8-bit unsigned integer
short         16-bit integer
long          32-bit integer
float         32-bit floating point
double        64-bit floating point
str#          string of length #

String length usually includes space for a trailing \ . There is no default.

var_badvals

Specifies the bad value for each imported variable. The default for each variable is 0.

var_fields

Specifies the starting field for each variable in input text records. Fields are numbered starting with 1. The default starting field for the n-th variable is n.

fields_per_var

Specifies the number of fields for each variable per input text line. More than one value for each variable can appear on each input text line, with the restriction that all values for a given variable are contiguous. The default is 1.

delimeter

Specifies a delimeter to use instead of white-space to separate fields. The default is to interpret any sequence of white-space characters (e.g., blanks and tabs) as a field separator.

EXAMPLES

The first example imports 2-D data with one element per variable per each input text line.

[1] % cat ascii
100 -200 300 zero_zero
101 -201 310 zero_one
102 -202 320 zero_two
103 -203 330 zero_three
104 -204 340 zero_four
110 -210 301 one_zero
111 -211 311 one_one
112 -212 321 one_two
113 -213 331 one_three
114 -214 341 one_four
120 -220 302 two_zero
:
194 -294 349 nine_four

[2] % impasc ascii dataset
dim_sizes      : int (  3) ? 10 5
dim_names      : char( 63) ? [line sample]
var_names      : char(255) ? x y z w
var_units      : char(127) ? [- - - - ]
var_types      : char( 63) ? byte short short str12
var_badvals    : real(  4) ? [0 0 0 0]
start_fields   : int (  4) ? [1 2 3 4]
fields_per_var : int       ? [1]
delimeter      : char(  1) ? []
ascii: 50/50 complete lines found

The second example imports 2-D data with one row's worth of elements per each input text line.

[3] % cat matrix
11  12  13  14  15
21  22  23  24  25
:
91  92  93  94  95

[4] % impasc matrix dataset2
dim_sizes      : int (  3) ? 9 5
dim_names      : char( 63) ? [line sample]
var_names      : char(255) ? a
var_units      : char(127) ? [-]
var_types      : char( 63) ? byte
var_badvals    : real(  4) ? [0]
start_fields   : int (  4) ? [1]
fields_per_var : int       ? [1] 5
delimeter      : char(  1) ? []
matrix: 9/9 complete lines found

The last example imports a list cities along with their latitude and longitude coordinates. Because the city names contain blanks, the delimeter parameter had to be used.

[5] % cat cities
San Diego, 32.42, -117.09
Santa Barbara, 34.25, -119.42
:
Eureka, 40.48, -124.09

[6] % impasc cities dataset3
dim_sizes      : int (  3) ? 30
dim_names      : char( 31) ? [points]
var_names      : char(255) ? city latitude longitude
var_units      : char( 95) ? [- - - ] - std_latitude std_longitude
var_types      : char( 47) ? str16 float float
var_badvals    : real(  3) ? [0 0 0]
start_fields   : int (  3) ? [1 2 3]
fields_per_var : int       ? [1]
delimeter      : char(  1) ? [] ,
cities: 30/30 complete lines found

SEE ALSO

assemble, impbin, impbin1, datasets, formats, import


Last Update: $Date: 1998/09/10 21:12:53 $