PyPO User Manual
 
Loading...
Searching...
No Matches
Input Dictionary Reference

This section contains a list of all input dictionaries used in PyPO. More...

Variables

dict PyPO.Templates.reflDict
 Template for a reflDict, containing reflector parameters.
 
dict PyPO.Templates.TubeRTDict
 Template for a TubeRTDict, containing parameters for constructing a tubular ray-trace frame.
 
dict PyPO.Templates.GRTDict
 Template for a GRTDict, containing parameters for constructing a Gaussian ray-trace frame.
 
dict PyPO.Templates.GPODict
 Template for a GPODict, containing parameters for constructing a Gaussian physical optics beam.
 
dict PyPO.Templates.PSDict
 Template for a point source dictionary.
 
dict PyPO.Templates.aperDict
 Template for an aperture dictionary.
 
dict PyPO.Templates.runPODict
 Template for a physical optics propagation dictionary.
 
dict PyPO.Templates.runRTDict
 Template for a ray-trace propagation dictionary.
 
dict PyPO.Templates.hybridDict
 Template for a hybrid RT/PO propagation.
 

Detailed Description

This section contains a list of all input dictionaries used in PyPO.

Variable Documentation

◆ aperDict

dict PyPO.Templates.aperDict
Initial value:
1= {
2 "plot" : "Whether to include the aperDict in a plot or not (boolean)",
3 "center" : "Center of aperture, with respect to the origin of the xy plane, in mm (Numpy array of length 2)",
4 "outer" : "Outer semi-major (x) and minor (y) axes of aperture, in mm (Numpy array of length 2). Only when shape=='ellipse'.",
5 "inner" : "Inner semi-major (x) and minor (y) axes of aperture, in mm (Numpy array of length 2). Only when shape=='ellipse'.",
6 "outer_x" : "Outer min x and max x values of aperture, in mm (Numpy array of length 2). Only when shape=='rectangle'.",
7 "inner_x" : "Inner min x and max x values of aperture, in mm (Numpy array of length 2). Only when shape=='rectangle'.",
8 "outer_y" : "Outer min y and max y values of aperture, in mm (Numpy array of length 2). Only when shape=='rectangle'.",
9 "inner_y" : "Inner min x and max x values of aperture,, in mm (Numpy array of length 2). Only when shape=='rectangle'.",
10 "shape" : "Whether aperture is ellipse or rectangle, enum type."
11 }

Template for an aperture dictionary.

The aperture dictionary is used for efficiency calculations and plotting purposes. Because efficiencies are calculated in the restframe of a surface, the center and radius parameters should be interpreted as laying in the xy plane.

◆ GPODict

dict PyPO.Templates.GPODict
Initial value:
1= {
2 "name" : "Name of Gaussian beam",
3 "lam" : "Wavelength of Gaussian beam in mm (positive real)",
4 "w0x" : "Focal beamwaist of beam along x-axis in mm (positive real)",
5 "w0y" : "Focal beamwaist of beam along y-axis in mm (positive real)",
6 "n" : "Refractive index of medium",
7 "E0" : "Peak amplitude (real)",
8 "dxyz" : "Astigmatic distance between x and y focus in mm (real)",
9 "pol" : "Polarisation of beam (Numpy array of length 3)"
10 }

Template for a GPODict, containing parameters for constructing a Gaussian physical optics beam.

The beam is always initialised along the positive z-axis with the x focus at z = 0. Evaluation of the beam, however, can be on an arbitrary oriented/positioned plane along the beam. The beam can have elliptical contours, an arbitrary position angle and general astigmatism. Note that the x focus is always at z = 0, and the y focus is at -dxyz, with dxyz the astigmatic distance. The template for a scalar beam is similar, except that the polarisation is not needed.

◆ GRTDict

dict PyPO.Templates.GRTDict
Initial value:
1= {
2 "name" : "Name of Gaussian ray-trace frame (string)",
3 "lam" : "Wavelength of Gaussian beam in mm (positive real)",
4 "n" : "Refractive index of medium (positive real)",
5 "nRays" : "Number of rays in Gaussian beam (positive int)",
6 "x0" : "Beamwaist along x-axis in mm (positive real)",
7 "y0" : "Beamwaidt along y-axis in mm (positive real)",
8 "seed" : "Seed for rejection sampling of Gaussian beam (positive int)"
9 }

Template for a GRTDict, containing parameters for constructing a Gaussian ray-trace frame.

The Gaussian beam is constructed by rejection sampling of a Gaussian position and direction distribution. The divergence angles are calculated from n, lam, and x0/y0. The focus of the beam is always initialised at z = 0. After generation, the frame can be freely translated and rotated.

◆ hybridDict

dict PyPO.Templates.hybridDict
Initial value:
1= {
2 "fr_in" : "Name of input frame",
3 "field_in" : "Source reflected fields",
4 "t_name" : "Name of target surface",
5 "fr_out" : "Name of output frame",
6 "field_out" : "Name of output field",
7 "start" : "Starting point of rays, for spherical attenuation",
8 "interp" : "Whether to interpolate resulting field on surface",
9 "comp" : "If interp is True, which component to interpolate",
10 "tol" : "Tolerance of ray-tracer",
11 "nThreads" : "Number of CPU/GPU threads (int)",
12 "t0" : "Initial guess for propagation",
13 "device" : "Device to use for calculation"
14 }

Template for a hybrid RT/PO propagation.

◆ PSDict

dict PyPO.Templates.PSDict
Initial value:
1= {
2 "name" : "Name of point source (string)",
3 "lam" : "Wavelength of pint source in mm (positive real)",
4 "E0" : "Peak amplitude (real)",
5 "phase" : "Phase of point source",
6 "pol" : "Polarisation of point source (Numpy array of length 3)"
7 }

Template for a point source dictionary.

The point source is generated on the accompanying source surface. The template for a scalar beam is similar, except that the polarisation is not needed. The uniform source is generated using the same dictionary as the point source.

◆ reflDict

dict PyPO.Templates.reflDict
Initial value:
1= {
2 "name" : "Reflector name (string)",
3 "pmode" : "Direct abc definition, or vertex & foc(ii) (string). Only for quadric surfaces",
4 "gmode" : "xy gridding or polar uv gridding (string). For planar surfaces also includes Azimuth over Elevation (AoE)",
5 "flip" : "Flip reflector normal surfaces (bool)",
6 "coeffs" : "a, b and c parameters (list of 3 reals, pmode='manual' only)",
7 "vertex" : "Vertex co-ordinate (parabola only, len-3 Numpy array, pmode='focus' only)",
8 "focus_1" : "First focal point co-ordinate (len-3 Numpy array, pmode='focus' only)",
9 "focus_2" : "Second focal point co-ordinate (len-3 Numpy array, pmode='focus' only, hyperbola & ellipse only)",
10 "ecc" : "Eccentricity (hyperbola & ellipse only)",
11 "orient" : "Orient long axis along z ('z') or x ('x') axis. Only relevant for ellipsoids with 'pmode' set to 'focus'",
12 "lims_x" : "Upper and lower x-limit (gmode=xy, Numpy array of 2 reals)",
13 "lims_y" : "Upper and lower y-limit (gmode=xy, Numpy array of 2 reals)",
14 "lims_u" : "Aperture and vertex radii (gmode=uv, Numpy array of 2 reals)",
15 "lims_v" : "Upper and lower rotation angle (gmode=uv, Numpy array of 2 reals)",
16 "ecc_uv" : "Eccentricity of uv-generated xy_grid (uv only)",
17 "rot_uv" : "Position angle of uv-generated xy grid (uv only)",
18 "gridsize" : "Number of cells along x(u) and y(v) axes (Numpy array of 2 ints)"
19 }

Template for a reflDict, containing reflector parameters.

Note that some fields are only relevent when a certain reflectortype, gmode or pmode is chosen. This is signified in the key description.

◆ runPODict

dict PyPO.Templates.runPODict
Initial value:
1= {
2 "t_name" : "Name of target surface (string)",
3 "s_current" : "Name of current object in system.currents (string)",
4 "s_scalarfield" : "Scalar complex field for scalar propagation only (Numpy array)",
5 "epsilon" : "Relative permittivity of source surface (real)",
6 "exp" : "Divergent or convergent beam (string)",
7 "nThreads" : "Number of CPU/GPU threads (int)",
8 "device" : "Device to use for calculation",
9 "mode" : "Determine return object (string)",
10 "name_JM" : "Name of output currents (string). Only relevant if 'mode' is set to JM or JMEH.",
11 "name_EH" : "Name of output currents (string). Only relevant if 'mode' is set to EH, JMEH, EHP or FF.",
12 "name_field" : "Name of output scalarfield (string). Only relevant if 'mode' is set to scalar."
13 }

Template for a physical optics propagation dictionary.

The dictionary specifies several important parameters, such as the source currents, target surface and others.

◆ runRTDict

dict PyPO.Templates.runRTDict
Initial value:
1= {
2 "fr_in" : "Name of input frame",
3 "fr_out" : "Name of output frame",
4 "t_name" : "Name of target surface",
5 "tol" : "Tolerance of ray-tracer",
6 "nThreads" : "Number of CPU/GPU threads (int)",
7 "t0" : "Initial guess for propagation",
8 "device" : "Device to use for calculation"
9 }

Template for a ray-trace propagation dictionary.

The dictionary specifies several important parameters, such as the input frame, target surface and others.

◆ TubeRTDict

dict PyPO.Templates.TubeRTDict
Initial value:
1= {
2 "name" : "Name of tubular ray-trace frame (string)",
3 "nRays" : "Number of rays in a ray-trace ring (int)",
4 "nRing" : "Number of concentric ray-trace rings (int)",
5 "angx0" : "Opening angle in x-direction, degrees (real)",
6 "angy0" : "Opening angle in y-direction, degrees (real)",
7 "x0" : "Radius of outer ring along x-axis in mm (positive real)",
8 "y0" : "Radius of outer ring along y-axis in mm (positive real)"
9 }

Template for a TubeRTDict, containing parameters for constructing a tubular ray-trace frame.

Using the tube, one can create any distribution in between a point source and a collimated beam. The tube is cosntructed from concentrical elliptical rings, spaced equally apart. If the number of rings is zero, only the chief ray is generated. The tube can be given a semi-major and semi-minor axis. These are the used to construct the outer ring in the tube. In addition, opening angles along the semi-major and semi-minor axis can be specified.