Ray#
- class ansys.speos.core.input_files.ray_file.Ray(position=(0.0, 0.0, 0.0), direction=(0.0, 0.0, 1.0), wavelength=555.0, energy=1.0, polarization=None)#
Bases:
ansys.speos.core.input_files._base._ValueComparableSingle ray of a Speos ray file.
- Parameters:
- position
Tuple[float,float,float],optional Cartesian coordinates the ray starts from, in mm. By default,
(0.0, 0.0, 0.0).- direction
Tuple[float,float,float],optional Direction cosines
(l, m, n)of the ray, which must be a unit vector. By default,(0.0, 0.0, 1.0).- wavelength
float,optional Wavelength of the ray, in nm. By default,
555.0.- energy
float,optional Relative radiometric energy of the ray, between 0 and 1. The absolute flux of the ray is its share of the total flux of the file. By default,
1.0.- polarization
Optional[Tuple[float,float,float,float,float]],optional Polarization
(o, p, q, r, s), where(o, p, q)is the normalized big axis of the polarization ellipse,rthe ratio of its small axis over its big axis andsthe handedness,0for right and1for left. By default,None, for an unpolarized ray.
- position
- Parameters:
Notes
The direction cosines relate to the zenith angle theta and the azimuth angle phi through
l = sin(theta) * cos(phi),m = sin(theta) * sin(phi)andn = cos(theta). Vector setters store finite immutable tuples. The direction must already be normalized within a tolerance of 1e-3 when constructing or updating a ray; it is not normalized automatically.
Overview#
Check that the ray direction retains its unit norm. |
Starting coordinates in mm. |
|
Direction cosines of the ray. |
|
Wavelength of the ray, in nm. |
|
Relative radiometric energy. |
|
Polarization ellipse parameters. |
Import detail#
from ansys.speos.core.input_files.ray_file import Ray
Property detail#
Method detail#
- Ray.validate()#
Check that the ray direction retains its unit norm.
- Raises:
ValueErrorIf the direction is not a unit vector.