WRAPBSDF

NAME
SYNOPSIS
DESCRIPTION
EXAMPLE
AUTHOR
SEE ALSO

NAME

wrapBSDF - put XML wrapper around WINDOW6 BSDF data

SYNOPSIS

wrapBSDF [ -W ][ -c ][ -a {kf|kh|kq|t3|t4} ][ -u unit ][ -g geom.mgf ][ -f ’x=string;y=string’ ][ -s spectr ][ -tb inp ][ -tf inp ][ -rb inp ][ -rf inp ][ -U ][ -C comm ][ input.xml ]

DESCRIPTION

WrapBSDF takes ASCII matrix or tensor tree data given in one or more -tf, -tb, -rf, and -rb options and adds them to the given input.xml file or to a standard template suitable for Radiance and WINDOW6. The -W option may be given to ensure adherence to the WINDOW6 requirements, which draws from a standard template and warns the user if the required additional fields are not provided.

Fields may be set by one or more -f options, which take pairs of XML tag names and values, such as -f Manufacturer=ACME . A number of shorthand names are provided corresponding to the following tags (asterisk tags are required with -W):

m

Manufacturer(*)

n

Name(*)

d

DeviceType

c

ThermalConductivity

ef

EmissivityFront

eb

EmissivityBack

eo

EffectiveOpennessFraction

t

Thickness(*)

h

Height

w

Width

If any dimensions are given, thier units will correspond to meters by default, or the -u option may be used to specify one of: meter, foot, inch, centimeter, or millimeter. Any other unit specification will result in an error, and only one set of units may be selected. A "Materials and Geometry Format" file may be provided with the -g option, and will also be in the indicated units.

The spectrum corresponding to a particular set of data may be given before the data option using a -s specification, whose argument is either the name of a spectral sensitivity file or one of the standard spectra: Visible, Solar, NIR, CIE-u, CIE-v, CIE-X, or CIE-Z. Different spectra may be given for different distribution data, and the default spectrum is Visible (CIE-Y).

The -a option specifies the angular sampling basis for all the data provided, and must be set if any data is given. Legal arguments for this option are:

kf

Klems full sampling (145x145 matrix)

kh

Klems half sampling (73x73 matrix)

kq

Klems quarter sampling (41x41 matrix)

t3

Tensor tree isotropic sampling

t4

Tensor tree anisotropic sampling

In the case of Klems data, the -c option may be specified to include a correction for solid angle, which is necessary to convert flux form factors into BSDF data. Since flux factors rather than BSDF values are computed by rfluxmtx(1) and similar sources, this is often necessary for proper conversion.

Most options that accept file names can take data from the standard input by using a hyphen (’-’) in place of the file, but only one option at most may read from stdin. Data input may be read from another program by beginning the input specification with a quoted exclamation point (’!’) followed by the command.

The -C option may be used to specify a comment to be inserted near the head of the output. Up to 30 comment strings may be given, and they will appear one after the other in the prologue surrounded by the XML comment syntax.

The -U option tells wrapBSDF to unlink (remove) input data files following successful completion. These files are often temporary, existing solely for the purposes of data transfer. If given as -UU, then the MGF geometry file given by the -g option (if any) will also be unlinked.

EXAMPLE

Create an WINDOW6 BSDF from computed transmission matrix:

rfluxmtx -fa ... | wrapBSDF -W -u millimeter -f ’t=5;m=3M;n=Trans30’ -c -tb - > Trans30.xml

Add a name and MGF geometry to an XML file: Add a name and MGF geometry to an XML file:

wrapBSDF -f ’Name=My Device’ -g MyDevice.mgf orig.xml > revised.xml

AUTHOR

Greg Ward

SEE ALSO

bsdf2klems(1), bsdf2ttree(1), genBSDF(1), mgf2rad(1), pkgBSDF(1), rad2mgf(1), rfluxmtx(1)