Table of Contents
csf - copy structured file
csf in=in-file out=out-file
csf
copies a NEMO structured file. By using the item and select keyword items
can be selected by name and/or number. Note that items can currently only
be selected from the top level, items within a set can not be selected
this way; they are copied as a whole. This is likely to be improved at
a later stage. Automatic data-conversion can also be done. By default all
items are copied, and no data conversion is applied.
An overview of the
top level items that are present in a structured file can be obtained with
the following Unix pipe:
% tsf in_file | grep "^[a-z,A-Z]" | grep -v "^tes" | awk ’{print $2}’
Although structured files can always be read when they were created on
a byte swapped machine, csf can also be used to create a file in which
the bytes are not swapped.
The following parameters are recognized;
they may be given in any order if the keyword is also given.
- in=in-file
- Input
file, must be in filestruct(5NEMO)
format [no default].
- out=out-file
- Output
file, will be in filestruct(5NEMO)
format [no default].
- item=item-list
- List
of top level items, separated by comma’s or spaces, to be copied. If none
are provided, all items are selected. Note that the item-list will be case
sensitive. [default: -blank-].
- select=select-list
- List of numbers (1 being the
first) that are select for copying, after the above mentioned item-name
selection (from the item= keyword) has been applied. If none are provided,
all are copied. [default: -blank-].
- convert=convert-list
- List of conversions
to make, separated by comma’s or spaces. Each conversion is of the format
from2to, where both the from and to part are any of: d (double), f (float),
h (half precision) , l (long), i (int) or s (short). [Default: -blank-].
Some of the conversions in convert= are not supported or are in danger
of loosing more than just precision.
An image with too much data-history
can be cut by only copying the Image items:
% csf in=map1.ccd out=map2.ccd select=Image
Items can only be selected (select=) from the top level.
cp(1)
,
tsf(1NEMO)
, rsf(1NEMO)
Peter Teuben, Joshua E. Barnes
~/src/kernel/io csf.c
xx-xxx-87 V1.0: created JEB
9-dec-89 V1.1 added select keyword PJT
10-oct-90 V1.3 select= is now item=: select= used for counting PJT
4-mar-91 V1.4 added data conversion option via convert= PJT
13-feb-92 documentation added PJT
26-mar-95 V1.5 fixed selection bug and clarified doc PJT
12-dec-09 V1.6 added support for half precision (halfp) type PJT
Table of Contents