pyoptools.raytrace.ray.ray_source module¶
-
pyoptools.raytrace.ray.ray_source.
parallel_beam_c
(origin=(0.0, 0.0, 0.0), direction=(0.0, 0.0, 0.0), size=(1.0, 1.0), num_rays=(10, 10), wavelength=0.58929, label='', draw_color=None)¶ Cartesian grid parallel beam
This function creates a parallel beam, where the rays are organized in a cartesian grid.
Parameters:
- origin
- Tuple with the coordinates of the central ray origin
- direction
- Tuple with the rotation of the beam around the XYZ axes.
- size
- Tuple with the beam’s width and the height.
- num_rays
- Tuple (nx,ny) containing the number of rays used to create the beam.
- label
- String used to identify the ray source
- draw_color
Color used to represent the rays in plots. Default (None) automatically chooses a color based on the wavelength. Otherwise, can be any valid matplotlib color descriptor. See :
-
pyoptools.raytrace.ray.ray_source.
parallel_beam_p
(origin=(0.0, 0.0, 0.0), direction=(0.0, 0.0, 0), radius=0.5, num_rays=(5, 10), wavelength=0.58929, label='', draw_color=None)¶ Polar grid parallel beam
This function creates a parallel beam, where the rays are organized in a polar grid.
Parameters:
- origin
- Tuple with the coordinates of the central ray origin
- direction
- Tuple with the rotation of the beam around the XYZ axes.
- r
- Beam radious
- num_rays
- Tuple (nr,na) containing the number of rays used to create the beam.
- label
- String used to identify the ray source
- draw_color
Color used to represent the rays in plots. Default (None) automatically chooses a color based on the wavelength. Otherwise, can be any valid matplotlib color descriptor. See :
-
pyoptools.raytrace.ray.ray_source.
point_source_c
(origin=(0.0, 0.0, 0.0), direction=(0.0, 0.0, 0), span=(0.39269908169872414, 0.39269908169872414), num_rays=(10, 10), wavelength=0.58929, label='', draw_color=None)¶ Point source, with a cartesian beam distribution
This function creates a point source, where the rays are organized in a cartesian grid.
Parameters:
- origin
- Tuple with the coordinates of the central ray origin
- direction
- Tuple with the rotation of the beam around the XYZ axes.
- span
- Tuple angular size of the ray pencil.
- num_rays
- Tuple (nx,ny) containing the number of rays used to create the beam.
- label
- String used to identify the ray source
- draw_color
Color used to represent the rays in plots. Default (None) automatically chooses a color based on the wavelength. Otherwise, can be any valid matplotlib color descriptor. See :
-
pyoptools.raytrace.ray.ray_source.
point_source_p
(origin=(0.0, 0.0, 0.0), direction=(0.0, 0.0, 0), span=0.39269908169872414, num_rays=(10, 10), wavelength=0.58929, label='', draw_color=None)¶ Point source, with a polar beam distribution
This function creates a point source, where the rays are organized in a polar grid.
Parameters:
- origin
- Tuple with the coordinates of the central ray origin
- direction
- Tuple with the rotation of the beam around the XYZ axes.
- span
- Tuple angular size of the ray pencil.
- num_rays
- Tuple (nr,na) containing the number of rays used to create the beam # TODO Please be more descriptive. It seems really hard to know how much rays we’ll get in advance. What is nr? # TODO What is na?
- label
- String used to identify the ray source
- draw_color
Color used to represent the rays in plots. Default (None) automatically chooses a color based on the wavelength. Otherwise, can be any valid matplotlib color descriptor. See :
-
pyoptools.raytrace.ray.ray_source.
point_source_r
(origin=(0.0, 0.0, 0.0), direction=(0.0, 0.0, 0), span=0.39269908169872414, num_rays=100, wavelength=0.58929, label='', draw_color=None)¶ Point source, with a ranrom beam distribution
This function creates a point source, where the rays are organized in a random grid.
Parameters:
- origin
- Tuple with the coordinates of the central ray origin
- direction
- Tuple with the rotation of the beam around the XYZ axes.
- span
- Tuple angular size of the ray pencil.
- num_rays
- Number of rays used to create the beam
- label
- String used to identify the ray source
- draw_color
Color used to represent the rays in plots. Default (None) automatically chooses a color based on the wavelength. Otherwise, can be any valid matplotlib color descriptor. See :