sddsprocess
operates on the data columns and parameters of an existing SDDS data set and creates a new
data set. The program supports filtering and matching operations on both tabular data and parameter
data, definition of new parameters and columns in terms of existing ones, units conversions, scanning of
string data to produce numeric data, composition of string data from other data types,
statistical and waveform analyses, and other operations.
!
signifies logical negation. A page
passes a given filter by having the named parameter inside (or outside, if negation is given) the specified range,
where the endpoints are considered inside. A tabular data row passes a given filter in the analogous fashion, except
that the value from the named column is used.
One or more range specifications may be combined to give a accept/reject status by employing the logic-operations, &
(logical and) and SPMamp
|& (logical or). For example, to select rows for
which A is on [0, 1] and B is on [10, 20], one would use
-filter=column,A,0,1,B,10,20,&.
*
(matches zero of more
characters) and ?
(matches any one character).
If the first character of matchingString is '@', then the remainder of the string is taken to be the name of a parameter or column. In this case, the match is performed to the data in the named entity. For column-based matching, this is done row-by-row. For parameter-based matching, it is done page-by-page.
In addition, if instead of =
one uses =+
, then matching is case-insensitive. The plus sign is intended
to be mnemonic, as the case-insensitive matching results in additional matches.
The use of several match tests and logic is done just as for -filter. For example, to match all the rows for which the column Name starts with 'A' or 'B', one could use -match=column,Name=A*,Name=B*,|. (This could also be done with -match=column,Name=[AB]*.)
rpn
calculator initialization:
rpn
definitions files. By default, the file named in the RPN_DEFNS
environment variable is read.
rpn
expression to be executed. If
repeat is not specified, then the expression is executed before processing begins. If repeat is specified,
the expression is executed just after each page is read; it may use values of any of the numerical parameters for that
page. This option may be given any number of times.
sscanf
format string. The default type of the new data is double; this may be changed by
including a definitionEntry of the form type=typeName. With the exception of the name field,
any valid namelist command field and value may be given as part of the definitionEntries.
If sourceName contains wildcards, then newName must contain at least one occurrence of the string ``%s''. In this case, for each name that matches sourceName, an additional element is created, with a name created by substituting the name for ``%s'' in newName.
If sourceName contains wildcards, then newName must contain at least one occurrence of the string ``%s''. In this case, for each name that matches sourceName, an additional element is created, with a name created by substituting the name for ``%s'' in newName.
If commandName contains wildcards, then newName must contain at least one occurrence of ``%s''. In this case, for each name that matches commandName, an additional element is created, with a name created by substituting the name for ``%s'' in newName.
double
.
This and other properties of the new column or parameter may be
altered by giving definitionEntries, which have the form fieldName=value; fieldName is the name of any namelist
command field (except the name field) for a column or parameter, as
appropriate. This option may be given any number of times.
Using the select qualifier, it is possible to use a
single -define option to specify many instances of new column
definitions. If select is given, the input is searched for all
the column names matching matchString. These are then
optionally editted using the editCommand specified with editSelection. The resulting strings are then substituted one at a
time into name and equation, replacing all occurances of
``%s''. For example, suppose a file contained a number of
column-pairs of the form PrefixV1 and PrefixV2; to take
the difference of each pair, one could use
-define=column,%sDiff,%sV1 %sV2 -,select=*V1,edit=%/V1//
sddsprocess permits read access to individual elements of a
column of data using the rpn array feature. For each column, an
array of name &
ColumnName is created; the ampersand is to
remind the user that the variable &
ColumnName is the
address of the start of the array. To get the first element of a
column named Data
, one would use 0 &Data [. This will
function only within or following a -define=column or -redefine=column operation. It is an error to attempt to access data
beyond the bounds of an array.
The number of columns, and the current page and row number are pre-loaded into the rpn calculator memory according to the following table.
Quantity | rpn memory |
Page number | i_page |
Page number | table_number |
Row number | i_row |
Number of rows | n_rows |
Recognized values for analysisName are:
Qualifiers for this switch are:
ifis
option is not present, execution aborts. If any column that is named under a ifnot
option is
present, execution aborts.
retain
is given but delete
is not, only those entities matching one of the
strings given with retain
are retained. If both delete
and retain
are given, then all entities are retained except those that match a delete
string without
matching any of the retain
strings.