ObjectRays

class raytracing.ObjectRays(diameter, halfAngle=1.0, H=3, T=3, z=0, rayColors=None, color=None, label=None)

Bases: UniformRays

A set of rays used for objects.

Parameters:
  • diameter (float) – Diameter of the object.

  • H (int) – The number of point sources to create on the object (the number of ray fans) across its diameter.

  • T (int) – The number of rays to trace for each point source (ray fan) across halfAngle.

  • halfAngle (float) – The half angle of each ray fan.

  • z (float) – Position of the object in the optical path.

  • rayColors – Specify a color or a set of colors for the traced rays.

  • color – Color used to draw the graphics of the object (filled) and its images (outlined). By default, objects are blue and images are red, but this parameter overwrites both at the same time to help distinguish multiple objects in a path.

  • label (str) – Label to display over the object in the imaging path.

Methods

__init__(diameter[, halfAngle, H, T, z, ...])

Inherited Methods

append(ray[, copy])

A ray can be appended to the List of the rays using this function.

display([title, showTheta])

This function plots the intensity profiles of a list of rays.

displayProgress()

This function prints the progress of the iterations

load(filePath[, append])

A list of rays can be loaded using this function.

rayAnglesHistogram([binCount, minValue, ...])

This functions calculates the histogram for the angle of the rays.

rayCountHistogram([binCount, minValue, maxValue])

This functions calculates the histogram for the height of the rays.

save(filePath)

A list of rays can be saved using this function.

Attributes

count

Returns the number of rays in the list.

rays

thetaValues

Returns the angles of rays in the list.

yValues

Returns the heights of rays in the list.