|
Description
Source Primitives facilitate rapid definition of the most common radiant source types using a minimal set of construction parameters. All Source Primitive types share a common GUI layout designed to streamline access to the critical components of a source definition. In the script language, a compact set of scripting commands can be used to cleanly create, access and modify Source Primitives.
The following Source Primitive types are available:
Conversion to a Detailed Source
If deviation from the nominal Source Primitive behavior is desired, a Source Primitive can be converted to a Detailed Source. This conversion is permanent and irreversible, but allows the user complete and unrestricted control over every aspect of the source's construction. The capability to convert a Source Primitive to a Detailed Source can be useful, for example, if a Source Primitive mostly describes the intended source behavior. The user could start with a Source Primitive and then convert it to a Detailed Source in order to implement the final modifications. In this way, the user does not need to build the final source from scratch using the Detailed Source interface.
Restrictions and Detailed Sources
Source Primitive nodes may be edited as Detailed Sources by right mouse clicking on the source node and selecting, "Edit/View Detailed Optical Source" from the context menu. However, in order to maintain the integrity of the Source Primitive construction, modifications made to the Positions/Directions, Power, Coherence, Polarization and Wavelengths/Spectrum tabs will cause the Source Primitive to be permanently converted to a Detailed Source. When pressing the OK or Apply buttons on the Detailed Source dialog, a warning message regarding conversion to a Detailed Source will be displayed if changes to any of these tabs are detected. The user will be given the opportunity to Cancel the changes in order to preserve the node as a Source Primitive. Conversion to a Detailed Source is permanent and the Source Primitive node will not be recoverable.
Source Primitive Parameters (script reference)
When operating on Source Primitive nodes in the scripting language, it will be common to retrieve or modify specific construction parameters. There are two styles of script commands for retrieving and setting Source Primitive construction parameters.
Source Primitives that are able to have their individual parameter values set independently of the other parameters can use a general purpose SourcePrimSetParmValue script command. The Source Primitives listed in the two columns on the left of the table below support the use of the general SourcePrim(Get/Set)ParmValue script commands. The relationships between between parameter index values and their associated meaning for each of these primitives are individually itemized below.
Source Primitives whose internal configuration has an interdependency on the supplied parameters (i.e. all parameters are needed at the time of source construction) will use specific SourcePrim(Get/Set)Parm... scripting commands (ex. SourcePrimSetParmPtSrcCohSingle). These Source Primitives are listed in the two columns on the right of the table below, with links to their associated SourcePrimSetParm... command.
Plane Wave (coherent)
|
Parameter Index
|
Description
|
Allowed values
|
|
0
|
Power (watts)
|
Numeric value > 0
|
|
1
|
X semi-aperture
|
Numeric value > 0
|
|
2
|
Y semi-aperture
|
Numeric value > 0
|
|
3
|
Aperture Shape
|
"Ellipse/Circle" or "Rectangle/Square"
|
|
4
|
X samples (across diameter)
|
Integer > 0
|
|
5
|
Y samples (across diameter)
|
Integer > 0
|
|
6
|
(X,Y,Z) Plane wave direction vector
|
A string of delimited values
(ex. "0, 1.0, 1.0" )
|
Laser Beam (00 mode)
|
Parameter Index
|
Description
|
Allowed values
|
|
0
|
Power (watts)
|
Numeric value > 0
|
|
1
|
Number of samples across the source grid diameter
|
Integer > 0
|
|
2
|
1/e2 radius of the beam waist
|
Numeric value > 0
|
|
3
|
Semi-aperture of the source grid
|
Numeric value > 0
|
Plane Wave (incoherent)
|
Parameter Index
|
Description
|
Allowed values
|
|
0
|
Power (watts)
|
Numeric value > 0
|
|
1
|
Total number of random ray positions
|
Integer > 0
|
|
2
|
X semi-aperture
|
Numeric value > 0
|
|
3
|
Y semi-aperture
|
Numeric value > 0
|
|
4
|
Aperture shape
|
"Ellipse/Circle" or "Rectangle/Square"
|
|
5
|
(X,Y,Z) Plane wave direction vector
|
A string of delimited values
(ex. "0, 1.0, 1.0" )
|
Point Source (incoherent)
|
Parameter Index
|
Description
|
Allowed values
|
|
0
|
Power (watts)
|
Numeric value > 0
|
|
1
|
Total number of random ray directions
|
Integer > 0
|
|
2
|
Emission cone semi-angle (deg)
|
0 < value <= 90
|
Lambertian Plane
|
Parameter Index
|
Description
|
Allowed values
|
|
0
|
Power
|
Numeric value > 0
|
|
1
|
Power Units
|
"Watts"
"Lumens"
|
|
2
|
Number of starting ray positions
|
Integer > 0
|
|
3
|
Number of random directions per ray position
|
Integer > 0
|
|
4
|
X semi-aperture of the plane
|
Numeric value > 0
|
|
5
|
Y semi-aperture of the plane
|
Numeric value > 0
|
|
6
|
Aperture shape
|
"Ellipse/Circle"
"Rectangle/Square"
|
|
7
|
X outer semi-angle spread (deg)
|
0 < value <= 90
|
|
8
|
Y outer semi-angle spread (deg)
|
0 < value <= 90
|
|
9
|
Angular emission shape
|
"Ellipse/Circle"
"Rectangle/Square"
|
Lambertian Surface
|
Parameter Index
|
Description
|
Allowed values
|
|
0
|
Power
|
Numeric value > 0
|
|
1
|
Power Units
|
"Watts"
"Lumens"
|
|
2
|
Number of starting ray positions
|
Integer > 0
|
|
3
|
Emission surface
|
Node number of a surface
|
|
4
|
Reverse ray direction
|
0 for False
1 for True
|
|
5
|
Distance offset along surface normal
|
Numeric value
|
Rayfile Source
|
Parameter Index
|
Description
|
Allowed values
|
|
0
|
Power
|
Numeric value > 0
|
|
1
|
Power Units
|
"Watts"
"Lumens"
|
|
2
|
Rayfile to be used
|
String specifying the full file path to the rayfile
|
|
3
|
Subset of rays to generate (all rays = -1)
|
-1 for all rays, or
Integer > 0
|
Random Volume into a Sphere
|
Parameter Index
|
Description
|
Allowed values
|
|
0
|
Power
|
Numeric value > 0
|
|
1
|
Power Units
|
"Watts"
"Lumens"
|
|
2
|
Number of starting ray positions
|
Integer > 0
|
|
3
|
Number of random directions per ray position
|
Integer > 0
|
|
4
|
X semi-aperture of the volume
|
Numeric value > 0
|
|
5
|
Y semi-aperture of the volume
|
Numeric value > 0
|
|
6
|
Z semi-aperture of the volume
|
Numeric value > 0
|
|
7
|
The shape of the volume
|
"Box"
"Spheroid"
"Z-Cylinder"
"X-Cylinder"
"Y-Cylinder"
|
Solar Source (simple)
|
Parameter Index
|
Description
|
Allowed values
|
|
0
|
Irradiance (W/m2)
|
Numeric value > 0
|
|
1
|
Number of random ray positions
|
Integer > 0
|
|
2
|
Number of random directions per ray position
|
Integer > 0
|
|
3
|
X outer semi-aperture
|
Numeric value > 0
|
|
4
|
Y outer semi-aperture
|
Numeric value > 0
|
|
5
|
Aperture shape
|
"Ellipse/Circle"
"Rectangle/Square"
|
|
6
|
(X,Y,Z) Forward propagation direction
|
A string of delimited values
(ex. "0, 1.0, 1.0" )
|
Laser Diode (incoherent)
|
Parameter Index
|
Description
|
Allowed values
|
|
0
|
Power (Watts)
|
Numeric value > 0
|
|
1
|
Number of random ray positions
|
Integer > 0
|
|
2
|
Number of random directions per ray position
|
Integer > 0
|
|
3
|
1/e2 beam radius in X
|
Numeric value > 0
|
|
4
|
X semi-aperture of the emission plane
|
Numeric value > 0
|
|
5
|
Spatial super-Gaussian exponent in X
|
Numeric value > 1
|
|
6
|
1/e2 beam radius in Y
|
Numeric value > 0
|
|
7
|
Y semi-aperture of the emission plane
|
Numeric value > 0
|
|
8
|
Spatial super-Gaussian exponent in Y
|
Numeric value > 1
|
|
9
|
1/e2 beam semi-angle in X (deg)
|
Numeric value > 0
|
|
10
|
Source emission semi-angle in X (deg)
|
Numeric value > 0
|
|
11
|
Angular super-Gaussian exponent in X
|
Numeric value > 1
|
|
12
|
1/e2 beam semi-angle in Y (deg)
|
Numeric value > 0
|
|
13
|
Source emission semi-angle in Y (deg)
|
Numeric value > 0
|
|
14
|
Angular super-Gaussian exponent in Y
|
Numeric value > 1
|
Bitmap
|
Parameter Index
|
Description
|
Allowed values
|
|
0
|
Power (Watts)
|
Numeric value > 0
|
|
1
|
JPG or BMP file used by the emitter
|
Full file path string
|
|
2
|
Number of random rays per pixel per wavelength
|
Integer > 0
|
|
3
|
Number of random ray directions per ray position
|
Integer > 0
|
|
4
|
X semi-width of the source
|
Numeric value > 0
|
|
5
|
Y semi-width of the source
|
Numeric value > 0
|
|
6
|
X outer semi-angle spread (deg)
|
0 < Numeric value <= 90
|
|
7
|
Y outer semi-angle spread (deg)
|
0 < Numeric value <= 90
|
|
8
|
Angular emission shape
|
"Ellipse/Circle"
"Rectangle/Square"
|
Related Topics
Source Primitive Scripting Commands
Detailed Sources
|
Copyright © Photon Engineering, LLC
|
|