| 1 | 
greg | 
1.4 | 
.\" RCSid $Id: wrapBSDF.1,v 1.3 2015/05/29 07:45:48 greg Exp $ | 
| 2 | 
greg | 
1.1 | 
.TH WRAPBSDF 1 2/20/2015 RADIANCE | 
| 3 | 
  | 
  | 
.SH NAME | 
| 4 | 
  | 
  | 
wrapBSDF - put XML wrapper around WINDOW6 BSDF data | 
| 5 | 
  | 
  | 
.SH SYNOPSIS | 
| 6 | 
  | 
  | 
.B wrapBSDF | 
| 7 | 
  | 
  | 
[ | 
| 8 | 
  | 
  | 
.B \-W | 
| 9 | 
  | 
  | 
][ | 
| 10 | 
  | 
  | 
.B \-c | 
| 11 | 
  | 
  | 
][ | 
| 12 | 
  | 
  | 
.B "\-a {kf|kh|kq|t3|t4}" | 
| 13 | 
  | 
  | 
][ | 
| 14 | 
  | 
  | 
.B "\-u unit" | 
| 15 | 
  | 
  | 
][ | 
| 16 | 
  | 
  | 
.B "\-g geom.mgf" | 
| 17 | 
  | 
  | 
][ | 
| 18 | 
  | 
  | 
.B "\-f 'x=string;y=string'" | 
| 19 | 
  | 
  | 
][ | 
| 20 | 
  | 
  | 
.B "\-s spectr" | 
| 21 | 
  | 
  | 
][ | 
| 22 | 
  | 
  | 
.B "\-tb inp" | 
| 23 | 
  | 
  | 
][ | 
| 24 | 
  | 
  | 
.B "\-tf inp" | 
| 25 | 
  | 
  | 
][ | 
| 26 | 
  | 
  | 
.B "\-rb inp" | 
| 27 | 
  | 
  | 
][ | 
| 28 | 
  | 
  | 
.B "\-rf inp" | 
| 29 | 
  | 
  | 
][ | 
| 30 | 
greg | 
1.3 | 
.B "\-C comm" | 
| 31 | 
  | 
  | 
][ | 
| 32 | 
greg | 
1.1 | 
.B "input.xml" | 
| 33 | 
  | 
  | 
] | 
| 34 | 
  | 
  | 
.SH DESCRIPTION | 
| 35 | 
  | 
  | 
.I WrapBSDF | 
| 36 | 
  | 
  | 
takes ASCII matrix or tensor tree data given in one or more | 
| 37 | 
  | 
  | 
.I "\-tf, \-tb, \-rf," | 
| 38 | 
  | 
  | 
and | 
| 39 | 
  | 
  | 
.I \-rb | 
| 40 | 
  | 
  | 
options and adds them to the given | 
| 41 | 
  | 
  | 
.I input.xml | 
| 42 | 
  | 
  | 
file or to a standard template suitable for | 
| 43 | 
  | 
  | 
.I Radiance | 
| 44 | 
  | 
  | 
and | 
| 45 | 
  | 
  | 
.I WINDOW6. | 
| 46 | 
  | 
  | 
The | 
| 47 | 
  | 
  | 
.I \-W | 
| 48 | 
  | 
  | 
option may be given to ensure adherence to the | 
| 49 | 
  | 
  | 
.I WINDOW6 | 
| 50 | 
  | 
  | 
requirements, which draws from a standard template | 
| 51 | 
  | 
  | 
and warns the user if the required additional fields are not | 
| 52 | 
  | 
  | 
provided. | 
| 53 | 
  | 
  | 
.PP | 
| 54 | 
  | 
  | 
Fields may be set by one or more | 
| 55 | 
  | 
  | 
.I \-f | 
| 56 | 
  | 
  | 
options, which take pairs of XML tag names and values, such as | 
| 57 | 
  | 
  | 
.I "\-f Manufacturer=ACME". | 
| 58 | 
  | 
  | 
A number of shorthand names are provided corresponding to the | 
| 59 | 
  | 
  | 
following tags (asterisk tags are required with -W): | 
| 60 | 
  | 
  | 
.sp | 
| 61 | 
  | 
  | 
.nf | 
| 62 | 
  | 
  | 
        m       Manufacturer(*) | 
| 63 | 
  | 
  | 
        n       Name(*) | 
| 64 | 
  | 
  | 
        c       ThermalConductivity | 
| 65 | 
  | 
  | 
        ef      EmissivityFront | 
| 66 | 
  | 
  | 
        eb      EmissivityBack | 
| 67 | 
  | 
  | 
        eo      EffectiveOpennessFraction | 
| 68 | 
  | 
  | 
        t       Thickness(*) | 
| 69 | 
  | 
  | 
        h       Height | 
| 70 | 
  | 
  | 
        w       Width | 
| 71 | 
  | 
  | 
.fi | 
| 72 | 
  | 
  | 
.PP | 
| 73 | 
  | 
  | 
If any dimensions are given, thier units will correspond to | 
| 74 | 
  | 
  | 
meters by default, or the | 
| 75 | 
  | 
  | 
.I \-u | 
| 76 | 
  | 
  | 
option may be used to specify one of: | 
| 77 | 
  | 
  | 
meter, foot, inch, centimeter, or millimeter. | 
| 78 | 
  | 
  | 
Any other unit specification will result in an error, and | 
| 79 | 
  | 
  | 
only one set of units may be selected. | 
| 80 | 
  | 
  | 
A "Materials and Geometry Format" file may be provided with the | 
| 81 | 
  | 
  | 
.I \-g | 
| 82 | 
  | 
  | 
option, and will also be in the indicated units. | 
| 83 | 
  | 
  | 
.PP | 
| 84 | 
  | 
  | 
The spectrum corresponding to a particular set of data may be given | 
| 85 | 
  | 
  | 
before the data option using a | 
| 86 | 
  | 
  | 
.I \-s | 
| 87 | 
  | 
  | 
specification, whose argument is either the name of a spectral | 
| 88 | 
  | 
  | 
sensitivity file or one of the standard spectra: | 
| 89 | 
  | 
  | 
Visible, Solar, NIR, CIE-u, CIE-v, CIE-X, or CIE-Z. | 
| 90 | 
  | 
  | 
Different spectra may be given for different distribution data, | 
| 91 | 
  | 
  | 
and the default spectrum is Visible (CIE-Y). | 
| 92 | 
  | 
  | 
.PP | 
| 93 | 
  | 
  | 
The | 
| 94 | 
  | 
  | 
.I \-a | 
| 95 | 
  | 
  | 
option specifies the angular sampling basis for all the data | 
| 96 | 
  | 
  | 
provided, and must be set if any data is given. | 
| 97 | 
  | 
  | 
Legal arguments for this option are: | 
| 98 | 
  | 
  | 
.sp | 
| 99 | 
  | 
  | 
.nf | 
| 100 | 
  | 
  | 
        kf      Klems full sampling (145x145 matrix) | 
| 101 | 
  | 
  | 
        kh      Klems half sampling (73x73 matrix) | 
| 102 | 
  | 
  | 
        kq      Klems quarter sampling (41x41 matrix) | 
| 103 | 
  | 
  | 
        t3      Tensor tree isotropic sampling | 
| 104 | 
  | 
  | 
        t4      Tensor tree anisotropic sampling | 
| 105 | 
  | 
  | 
.fi | 
| 106 | 
  | 
  | 
.sp | 
| 107 | 
  | 
  | 
In the case of Klems data, the | 
| 108 | 
  | 
  | 
.I \-c | 
| 109 | 
  | 
  | 
option may be specified to include a correction for solid | 
| 110 | 
  | 
  | 
angle, which is necessary to convert flux form factors into | 
| 111 | 
  | 
  | 
BSDF data. | 
| 112 | 
greg | 
1.4 | 
Since flux factors rather than BSDF values are computed by | 
| 113 | 
greg | 
1.1 | 
.I rfluxmtx(1) | 
| 114 | 
  | 
  | 
and similar sources, this is often necessary for proper conversion. | 
| 115 | 
  | 
  | 
.PP | 
| 116 | 
  | 
  | 
Most options that accept file names | 
| 117 | 
  | 
  | 
can take data from the standard input by using a hyphen ('-') | 
| 118 | 
  | 
  | 
in place of the file, but only one option at most may read from stdin. | 
| 119 | 
greg | 
1.2 | 
Data input may be read from another program by beginning the input | 
| 120 | 
  | 
  | 
specification with a quoted exclamation point ('!') followed by the command. | 
| 121 | 
greg | 
1.3 | 
.PP | 
| 122 | 
  | 
  | 
The | 
| 123 | 
  | 
  | 
.I \-C | 
| 124 | 
  | 
  | 
option may be used to specify a comment to be inserted near the | 
| 125 | 
  | 
  | 
head of the output. | 
| 126 | 
  | 
  | 
Up to 30 comment strings may be given, and they will appear one | 
| 127 | 
  | 
  | 
after the other in the prologue surrounded by the XML comment syntax. | 
| 128 | 
greg | 
1.1 | 
.SH EXAMPLE | 
| 129 | 
  | 
  | 
Create an WINDOW6 BSDF from computed transmission matrix: | 
| 130 | 
  | 
  | 
.IP "" .2i | 
| 131 | 
  | 
  | 
rfluxmtx -fa ... | wrapBSDF -W -u millimeter -f 't=5;m=3M;n=Trans30' -c -tb - > Trans30.xml | 
| 132 | 
  | 
  | 
.PP | 
| 133 | 
  | 
  | 
Add a name and MGF geometry to an XML file: | 
| 134 | 
  | 
  | 
Add a name and MGF geometry to an XML file: | 
| 135 | 
  | 
  | 
.IP "" .2i | 
| 136 | 
  | 
  | 
wrapBSDF -f 'Name=My Device' -g MyDevice.mgf orig.xml > revised.xml | 
| 137 | 
  | 
  | 
.SH AUTHOR | 
| 138 | 
  | 
  | 
Greg Ward | 
| 139 | 
  | 
  | 
.SH "SEE ALSO" | 
| 140 | 
  | 
  | 
bsdf2klems(1), bsdf2ttree(1), genBSDF(1), mgf2rad(1), | 
| 141 | 
  | 
  | 
pkgBSDF(1), rad2mgf(1), rfluxmtx(1) |