ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rcomb.1
(Generate patch)

Comparing ray/doc/man/man1/rcomb.1 (file contents):
Revision 1.3 by greg, Tue Dec 19 00:39:03 2023 UTC vs.
Revision 1.10 by greg, Fri Jun 28 21:04:49 2024 UTC

# Line 11 | Line 11 | rcomb - combine and convert matrices a row at a time
11   ][
12   .B \-f[afdc]
13   ][
14 + .B "\-n nproc"
15 + ][
16   .B "\-f file"
17   ][
18   .B "\-e expr"
# Line 53 | Line 55 | or
55   .I \-s
56   options follow the last input matrix, output results will be transformed
57   and/or scaled accordingly.
58 < These operations are discussed in greater detail further on.
58 > These operations are discussed in greater detail below.
59   A single concatenation matrix may be applied after element operations
60   using the
61   .I \-m
# Line 71 | Line 73 | FORMAT={ascii|float|double|32-bit_rle_rgbe|32-bit_rle_
73   .fi
74   .sp
75   The number of components indicates that each matrix element is actually
76 < composed of multiple elements, most commonly an RGB triple.
76 > composed of multiple channels, most commonly an RGB triple.
77   This is essentially dividing the matrix into planes, where each component
78   participates in a separate calculation.
79   If an appropriate header is not present, it may be added with a call to
# Line 94 | Line 96 | will be undone, similar to the
96   option.
97   Radiance spectral pictures with more than 3 components are also supported.
98   These are typically produced by
99 < .I rtrace(1)
99 > .I rtpict(1)
100   or
101   .I rfluxmtx(1).
102   .PP
# Line 141 | Line 143 | or
143   is specified for an input picture or the
144   .I "-fc"
145   option is given, the output will be written as a RGBE or XYZE picture.
146 < Note that conversion from a float or RGBE color space applies a conversion
146 > Note that conversion from a float or RGBE color space applies an efficacy factor
147   of 179 lumens/watt (for CIE or melanopic output) or 412 (for scotopic output),
148 < and the reverse happens for conversion from XYZE input to RGB or RGBE output.
148 > and the inverse happens for conversion from XYZE input to RGB or RGBE output.
149   Lower case versions of all these components are also supported, the only
150 < difference is that the aforementioned efficacy factors
149 < will be left out of the conversion.
150 > difference being that the efficacy factors are ignored.
151   .PP
152   If a matrix or picture file path is given to the
153   .I \-c
# Line 188 | Line 189 | If the
189   or
190   .I \-f
191   options are used to define a "co" variable or "co(p)" function,
192 < this will be evaluated at each output
193 < component for the current element.
192 > which will be evaluated for each output
193 > component from the current element.
194   The "co" variable defines identical operations for all components,
195   whereas "co(p)" may specify different operations for each component.
196   The element position is defined
# Line 207 | Line 208 | and the number of components is defined by the "ncomp"
208   If given as "ci(i)", the function returns the current component
209   being evaluated by
210   .I rcomb.
211 < A different component may be referenced using th second argument.
211 > A different component may be referenced using the second argument.
212   For example, "ci(1,2)" accesses
213   the second component from the first input.
214   If the input is a picture, the the constants "R", "G", and "B"
# Line 222 | Line 223 | For convenience and compatibility with
223   the functions "ri(i)", "gi(i)", and "bi(i)" are predefined as
224   "ci(i,R)", "ci(i,G)", and "ci(i,B)", respectively.
225   Accordingly, the "ro", "go", and "bo"
226 < variables may be used in place of "co(R)", "co(G)", and "co(B)".
226 > variables may be used in place of "co(R)", "co(G)", and "co(B)",
227 > but all three must be defined for this substitution to take place.
228   Finally, the total number of input files is set in the constant "nfiles".
229   .PP
230   Results are sent to the standard output.
# Line 249 | Line 251 | The
251   .I \-w
252   option turns off warnings about divide-by-zero and other non-fatal
253   calculation errors.
254 + .PP
255 + The
256 + .I \-n
257 + option specifies how many execution processes to employ,
258 + which may improve performance on multi-core architectures,
259 + especially for matrix multiplication
260 + and complex operations on long input rows.
261   .SH EXAMPLES
262 < To convert two hyperspectral inputs to RGB color space,
262 > To convert two hyperspectral pictures to RGB color space,
263   average them together, and write them out as a RADIANCE picture:
264   .IP "" .2i
265 < rcomb -C RGB -s .5 img1.spc -s .5 img2.spc > avg.hdr
265 > rcomb -C RGB -s .5 img1.hsr -s .5 -fc img2.hsr > avg.hdr
266   .PP
267   Divide one set of matrix elements by the Euclidean sum of two others:
268   .IP "" .2i
# Line 263 | Line 272 | inp2.mtx inp3.mtx > out.mtx
272   Compute the absolute and relative differences between melanopic and photopic values
273   in a spectral image:
274   .IP "" .2i
275 < rcomb -fa -C MY -e "abs(x):if(x,x,-x)"
275 > rcomb -C MY -e "abs(x):if(x,x,-x)"
276   -e "co(p)=select(p,abs(ci(1,1)-ci(1,2)),(ci(1,1)-ci(1,2))/ci(1,2))"
277 < input_spec.hsr > compare.mtx
277 > input_spec.hsr -fa > compare.mtx
278   .PP
279   Concatenate a spectral flux coefficient matrix with a spectral sky
280   matrix to compute a set of melanopic lux values:
# Line 280 | Line 289 | and
289   .I pcomb,
290   whose capabilities somewhat overlap.
291   The former loads each matrix into memory before operations,
292 < and element components take 8 bytes apiece, adding up quickly.
292 > and element components are stored as double-precision.
293   Very large matrices therefore present a problem with that tool.
294   Furthermore,
295   .I rmtxop
# Line 313 | Line 322 | Generally speaking,
322   .I rcomb
323   should be preferred over
324   .I rmtxop
325 < for any operations in can handle, which is everything except
325 > for any operations it can handle, which is everything except
326   multiple matrix concatenations and transpose
327 < operations, which are handled more efficiently by
328 < .I rcollate(1)
329 < in any case.
327 > operations.
328 > The latter may be handled more efficiently by
329 > .I rcollate(1).
330   That said, there is no significant difference for
331 < simple operations on smallish matrices, and note that only
331 > simple operations on small matrices, and only
332   .I rmtxop
333   and
334   .I dctimestep(1)
335 < currently accept XML files as inputs.
336 < Also, the resizing function of
335 > accept XML files as inputs.
336 > Also note that the resizing function of
337   .I pcomb
338   is not supported in
339   .I rcomb,
340   and should instead be handled by
341   .I pfilt(1).
342 + .SH BUGS
343 + The
344 + .I rcomb
345 + command currently ignores the "PRIMARIES" setting in input
346 + headers, and does not produce any on output, even in
347 + circumstances where it would make sense to.
348   .SH AUTHOR
349   Greg Ward
350   .SH "SEE ALSO"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines