ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rcollate.1
Revision: 1.3
Committed: Fri Sep 6 21:34:38 2013 UTC (11 years, 7 months ago) by greg
Branch: MAIN
Changes since 1.2: +6 -1 lines
Log Message:
Added -w option to turn off warnings

File Contents

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