ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rcollate.1
Revision: 1.2
Committed: Thu Sep 5 18:50:30 2013 UTC (11 years, 9 months ago) by greg
Branch: MAIN
Changes since 1.1: +8 -12 lines
Log Message:
Minor wording fixes

File Contents

# Content
1 .\" RCSid "$Id: rcollate.1,v 1.1 2013/09/05 17:53:22 greg Exp $"
2 .TH RCOLLATE 1 7/8/97 RADIANCE
3 .SH NAME
4 rcollate - resize or transpose matrix data
5 .SH SYNOPSIS
6 .B rcollate
7 [
8 .B \-h
9 ][
10 .B \-f[afdb][N]]
11 ][
12 .B \-t
13 ][
14 .B "\-ic in_col"
15 ][
16 .B "\-ir in_row"
17 ][
18 .B "\-oc out_col"
19 ][
20 .B "\-or out_row"
21 ]
22 [
23 .B input.dat
24 ]
25 .SH DESCRIPTION
26 .I Rcollate
27 reads in a single matrix file (table) and reshapes it to have
28 the number of columns specified by the
29 .I \-oc
30 option.
31 By default, the file is assumed to include an information header, which
32 is copied to the standard output along with the command name, but the
33 .I \-h
34 option may be used to turn this behavior off.
35 .PP
36 The input format is assumed to be ASCII, with three white-space separated words
37 (typically numbers) in each record.
38 A different input format may be specified with the
39 .I \-f
40 option.
41 The suboptions are
42 .I \-fa,
43 .I \-ff,
44 .I \-fd,
45 and
46 .I \-fb
47 for ASCII, float, double, and binary, respectively.
48 An optional count may be attached to specify the number of data elements per
49 record, which defaults to 1.
50 Thus, the default setting is
51 .I \-fa3.
52 Since
53 .I rcollate
54 does not interpret the fields, all binary options of the same
55 length have the same result.
56 On most architectures,
57 .I \-ff6,
58 .I \-fd3,
59 and
60 .I \-fb24
61 would all be equivalent.
62 Note that the lack of row separators in binary files means that
63 .I rcollate
64 does not actually do anything for binary files unless the transpose
65 option is given, also.
66 .PP
67 The transpose option,
68 .I \-t
69 swaps rows and columns on the input.
70 For binary files, the user must specify at least one input or output
71 dimension to define the matrix size.
72 For ASCII files,
73 .I rcollate
74 will automatically determine the number of columns based on the
75 position of the first EOL (end-of-line) character, and the number
76 of rows based on the total count of records in the file.
77 The user may override these determinations, allowing the matrix to
78 be resized as well as transposed.
79 If input and output dimensions are given, the number of input rows
80 must equal the number of output columns,
81 and the number of input columns must equal the number of output rows.
82 For large transpose operations on Unix systems, it is most efficient
83 to specify the input file on the command line, rather than reading
84 from the standard input, since
85 .I rcollate
86 can map the file directly into memory.
87 .SH EXAMPLE
88 To change put 8760 color triplets per row in a matrix with no header:
89 .IP "" .2i
90 rcollate -h \-oc 8760 input.dat > col8760.dat
91 .PP
92 To transpose a binary file with 145 float triplets per input row:
93 .IP "" .2i
94 rcollate -ff3 -ic 145 -t orig.flt > transpose.flt
95 .SH AUTHOR
96 Greg Ward
97 .SH NOTES
98 The
99 .I rcollate
100 command is rather inflexible when it comes to output field and record
101 separators for ASCII data.
102 It accepts any amount of white space between fields
103 on input, but only produces spaces as field separators
104 between words and tabs as record separators on output.
105 Output row separtors will always be an EOL, which may differ between systems.
106 .PP
107 If no options are given on the command line, or a binary file is specified
108 without a transpose,
109 .I rcollate
110 issues a warning and simply copies its input to its standard output.
111 .SH "SEE ALSO"
112 cnt(1), histo(1), neaten(1), rcalc(1), rlam(1), tabfunc(1), total(1)