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.2 by greg, Mon Dec 18 23:04:05 2023 UTC vs.
Revision 1.14 by greg, Thu Jun 19 22:36:53 2025 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 23 | Line 25 | rcomb - combine and convert matrices a row at a time
25   ]
26   .B "m1 .."
27   [
28 < .B "\-m mcat"
28 > .B "\-m[t] mcat"
29   ]
30   .SH DESCRIPTION
31   .I Rcomb
# 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
62   option.
63 + If the option is given as
64 + .I \-mt
65 + then the concatenation matrix will be transposed before it is applied.
66   Matrix concatenation will happen before or after any trailing
67   operations, depending on relative command line placement.
68   .PP
# Line 71 | Line 76 | FORMAT={ascii|float|double|32-bit_rle_rgbe|32-bit_rle_
76   .fi
77   .sp
78   The number of components indicates that each matrix element is actually
79 < composed of multiple elements, most commonly an RGB triple.
79 > composed of multiple channels, most commonly an RGB triple.
80   This is essentially dividing the matrix into planes, where each component
81   participates in a separate calculation.
82   If an appropriate header is not present, it may be added with a call to
# Line 94 | Line 99 | will be undone, similar to the
99   option.
100   Radiance spectral pictures with more than 3 components are also supported.
101   These are typically produced by
102 < .I rtrace(1)
102 > .I rtpict(1)
103   or
104   .I rfluxmtx(1).
105   .PP
# Line 141 | Line 146 | or
146   is specified for an input picture or the
147   .I "-fc"
148   option is given, the output will be written as a RGBE or XYZE picture.
149 < Note that conversion from a float or RGBE color space applies a conversion
149 > Note that conversion from a float or RGBE color space applies an efficacy factor
150   of 179 lumens/watt (for CIE or melanopic output) or 412 (for scotopic output),
151 < and the reverse happens for conversion from XYZE input to RGB or RGBE output.
151 > and the inverse happens for conversion from XYZE input to RGB or RGBE output.
152 > Lower case versions of all these components are also supported, the only
153 > difference being that the efficacy factors are ignored.
154   .PP
155   If a matrix or picture file path is given to the
156   .I \-c
# Line 185 | Line 192 | If the
192   or
193   .I \-f
194   options are used to define a "co" variable or "co(p)" function,
195 < this will be evaluated at each output
196 < component for the current element.
195 > which will be evaluated for each output
196 > component from the current element.
197   The "co" variable defines identical operations for all components,
198   whereas "co(p)" may specify different operations for each component.
199   The element position is defined
# Line 204 | Line 211 | and the number of components is defined by the "ncomp"
211   If given as "ci(i)", the function returns the current component
212   being evaluated by
213   .I rcomb.
214 < A different component may be referenced using th second argument.
214 > A different component may be referenced using the second argument.
215   For example, "ci(1,2)" accesses
216   the second component from the first input.
217   If the input is a picture, the the constants "R", "G", and "B"
# Line 219 | Line 226 | For convenience and compatibility with
226   the functions "ri(i)", "gi(i)", and "bi(i)" are predefined as
227   "ci(i,R)", "ci(i,G)", and "ci(i,B)", respectively.
228   Accordingly, the "ro", "go", and "bo"
229 < variables may be used in place of "co(R)", "co(G)", and "co(B)".
229 > variables may be used in place of "co(R)", "co(G)", and "co(B)",
230 > but all three must be defined for this substitution to take place.
231   Finally, the total number of input files is set in the constant "nfiles".
232   .PP
233   Results are sent to the standard output.
# Line 246 | Line 254 | The
254   .I \-w
255   option turns off warnings about divide-by-zero and other non-fatal
256   calculation errors.
257 + .PP
258 + The
259 + .I \-n
260 + option specifies how many execution processes to employ,
261 + which may improve performance on multi-core architectures,
262 + especially for matrix multiplication
263 + and complex operations on long input rows.
264   .SH EXAMPLES
265 < To convert two hyperspectral inputs to RGB color space,
265 > To convert two hyperspectral pictures to RGB color space,
266   average them together, and write them out as a RADIANCE picture:
267   .IP "" .2i
268 < rcomb -C RGB -s .5 img1.spc -s .5 img2.spc > avg.hdr
268 > rcomb -C RGB -s .5 img1.hsr -s .5 -fc img2.hsr > avg.hdr
269   .PP
270   Divide one set of matrix elements by the Euclidean sum of two others:
271   .IP "" .2i
# Line 260 | Line 275 | inp2.mtx inp3.mtx > out.mtx
275   Compute the absolute and relative differences between melanopic and photopic values
276   in a spectral image:
277   .IP "" .2i
278 < rcomb -fa -C MY -e "abs(x):if(x,x,-x)"
278 > rcomb -C MY -e "abs(x):if(x,x,-x)"
279   -e "co(p)=select(p,abs(ci(1,1)-ci(1,2)),(ci(1,1)-ci(1,2))/ci(1,2))"
280 < input_spec.hsr > compare.mtx
280 > input_spec.hsr -fa > compare.mtx
281   .PP
282   Concatenate a spectral flux coefficient matrix with a spectral sky
283   matrix to compute a set of melanopic lux values:
# Line 277 | Line 292 | and
292   .I pcomb,
293   whose capabilities somewhat overlap.
294   The former loads each matrix into memory before operations,
295 < and element components take 8 bytes apiece, adding up quickly.
295 > and element components are stored as double-precision.
296   Very large matrices therefore present a problem with that tool.
297   Furthermore,
298   .I rmtxop
# Line 310 | Line 325 | Generally speaking,
325   .I rcomb
326   should be preferred over
327   .I rmtxop
328 < for any operations in can handle, which is everything except
328 > for any operations it can handle, which is everything except
329   multiple matrix concatenations and transpose
330 < operations, which are handled more efficiently by
331 < .I rcollate(1)
332 < in any case.
330 > operations.
331 > The latter may be handled more efficiently by
332 > .I rcollate(1).
333   That said, there is no significant difference for
334 < simple operations on smallish matrices, and note that only
334 > simple operations on small matrices, and only
335   .I rmtxop
336   and
337   .I dctimestep(1)
338 < currently accept XML files as inputs.
339 < Also, the resizing function of
338 > accept XML files as inputs.
339 > Also note that the resizing function of
340   .I pcomb
341   is not supported in
342   .I rcomb,
343   and should instead be handled by
344   .I pfilt(1).
345 + .PP
346 + Similar to
347 + .I rmtxop,
348 + all calculations are peformed internally using 32-bit floating-point,
349 + so there is little benefit in either reading or writing 64-bit double
350 + data.
351 + This may be overridden at compile time using the macro
352 + "-DDTrmx_native=DTdouble".
353 + .SH BUGS
354 + The
355 + .I rcomb
356 + command currently ignores the "PRIMARIES" setting in input
357 + headers, and does not produce any on output, even in
358 + circumstances where it would make sense to.
359   .SH AUTHOR
360   Greg Ward
361   .SH "SEE ALSO"
362   dctimestep(1), icalc(1), getinfo(1), pcomb(1), pfilt(1),
363 < ra_xyze(1), rcalc(1),
363 > pvsum(1), ra_rgbe(1), ra_xyze(1), rcalc(1),
364   rcollate(1), rcontrib(1), rcrop(1), rfluxmtx(1),
365   rmtxop(1), rtpict(1), rtrace(1), vwrays(1)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines