impbin [ parameter=value ... ] [ inputfile outputfile ] impbin [ parameter=value ... ] [ inputfile ... directory ] imppipe [ parameter=value ... ] [ outputfile ]
Parameters for impbin are: dim_sizes, dim_names, var_names, var_units, var_types, var_badvals, sort_by_var, header_size, record_size, rel_offsets, instantiate.
Parameters for imppipe are: dim_sizes, dim_names, var_names, var_units, var_types, var_badvals, sort_by_var, header_size, record_size, rel_offsets.
impbin produces TeraScan datasets from binary files. imppipe works the same as impbin, except that impipe reads from UNIX stdin. impbin can create as many output files as there are input files. imppipe can only create one output file.
impbin 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, impbin must be run more than once; the resulting datasets must then be combined using the assemble function.
Two input forms are supported: sorted by variable, and sorted by record.
<header> <pad 1> <all data for variable 1> <pad 2> <all data for variable 2> ... <header> <pad 1> <var1 data> <pad 2> <var2 data> ... <pad 1> <var1 data> <pad 2> <var2 data> ... :
If the input is sorted by variable, all data for each variable is contiguous.
If the input is sorted by record, all data for each variable row is contiguous. (A variable row is defined to be all elements with the same leading dimension.) Also, the offset in bytes between elements [j, 0, ..., 0] and [j+1, 0, ..., 0] must be the same for all variables. This offset is called the record_size.
For both forms, pad lengths are also referred to as rel_offsets. See below.
Specifies the list of dimension sizes. Valid responses are one, two, or three positive integers. There is no default.
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].
Specifies a list of up to 64 variable names. Each name can be at most 31 characters long. There is no default.
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 impbin:
units converted to yymmdd std_date yyddd std_date hhmmss std_timeTimes are always assumed to be GMT.
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.
Specifies the bad value for each imported variable. The default for each variable is 0.
Indicates whether or not the data for each variable is contiguous in the input binary files. Otherwise the input variables are assumed to be sorted by record. Valid responses are [yes, no]. The default is yes.
Number of bytes to skip before reading any data. The default is 0.
Used only when sort_by_var=no. For any given variable, this parameter specifies the offset in bytes between elements [j, 0, ..., 0] and [j+1, 0, ..., 0]. The default is the sum of the row lengths in bytes of each the imported variables.
Specifies the length of padding in bytes before each case of variable data. The default is 0 for each imported variable.
Indicates whether or not the variable data is to be copied from the input files to the corresponding output files. Otherwise, the data is not copied, and the output files contain link variables pointing back to the input files. Valid responses are [yes, no]. The default is no. This parameter is only used by impbin.
In the first example, the input data is sorted by record:
<644 byte header> <206 byte pad> <628 elements for av2> <628 elements for av4> <206 byte pad> <628 elements for av2> <628 elements for av4> : [2] % impbin new7 output dim_sizes : int ( 3) ? 377 628 dim_names : char( 63) ? [line sample] var_names : char(255) ? av2 av4 var_units : char( 63) ? [- - ] var_types : char( 31) ? sh sh var_badvals : real( 2) ? [0 0] sort_by_var : char( 3) ? [yes] n header_size : int ? [0] 644 record_size : int ? [2512] 2718 rel_offsets : int ( 2) ? [0 0] 206 0 instantiate : char( 3) ? [no]
In the second example, the input data is sorted by variable:
<644 byte header> <512*640 elements for av2> <512*640 elements for av2> [3] % impbin new7r /tmp/junk dim_sizes : int ( 3) ? 512 640 dim_names : char( 63) ? [line sample] var_names : char(255) ? av2 av4 var_units : char( 63) ? [- - ] var_types : char( 31) ? sh sh var_badvals : real( 2) ? [0 0] sort_by_var : char( 3) ? [yes] header_size : int ? [0] 644 rel_offsets : int ( 2) ? [0 0] instantiate : char( 3) ? [no]
assemble, impasc, impbin1, datasets, formats, import
Last Update: $Date: 1998/05/29 17:36:03 $