Surface

class kgpy.optics.surfaces.Surface(name='', plot_kwargs=<factory>, transform=<factory>, is_field_stop=False, is_pupil_stop=False, is_pupil_stop_test=False, is_active=True, is_visible=True, sag=None, material=None, aperture=None, aperture_mechanical=None, ruling=None, baffle_loft_ids=<factory>)

Bases: WritableMixin, Broadcastable, Transformable, Plottable, Named, ABC, Generic[SagT, MaterialT, ApertureT, ApertureMechT, RulingT]

Interface for representing an optical surface.

Parameters:
  • name (str) –

  • plot_kwargs (Dict[str, Any] | None) –

  • transform (TransformList) –

  • is_field_stop (bool) –

  • is_pupil_stop (bool) –

  • is_pupil_stop_test (bool) –

  • is_active (bool) –

  • is_visible (bool) –

  • sag (SagT | None) –

  • material (MaterialT | None) –

  • aperture (ApertureT | None) –

  • aperture_mechanical (ApertureMechT | None) –

  • ruling (RulingT | None) –

  • baffle_loft_ids (List[int]) –

__init__(name='', plot_kwargs=<factory>, transform=<factory>, is_field_stop=False, is_pupil_stop=False, is_pupil_stop_test=False, is_active=True, is_visible=True, sag=None, material=None, aperture=None, aperture_mechanical=None, ruling=None, baffle_loft_ids=<factory>)
Parameters:
  • name (str) –

  • plot_kwargs (Dict[str, Any] | None) –

  • transform (TransformList) –

  • is_field_stop (bool) –

  • is_pupil_stop (bool) –

  • is_pupil_stop_test (bool) –

  • is_active (bool) –

  • is_visible (bool) –

  • sag (SagT | None) –

  • material (MaterialT | None) –

  • aperture (ApertureT | None) –

  • aperture_mechanical (ApertureMechT | None) –

  • ruling (RulingT | None) –

  • baffle_loft_ids (List[int]) –

Return type:

None

Attributes

aperture

Aperture of this surface

aperture_mechanical

Mechanical aperture of this surface

broadcasted

dataframe

is_active

Flag to disable the surface

is_field_stop

is_pupil_stop

is_pupil_stop_test

is_visible

Flag to disable plotting this surface

material

Material type for this surface

name

ruling

Ruling profile of this surface

sag

Sag profile of this surface

shape

plot_kwargs

baffle_loft_ids

transform

Methods

__init__([name, plot_kwargs, transform, ...])

copy()

rtype:

typing.TypeVar(CopyableT, bound= Copyable)

copy_shallow()

rtype:

typing.TypeVar(CopyableT, bound= Copyable)

plot(ax[, component_x, component_y, ...])

rtype:

typing.List[matplotlib.lines.Line2D]

propagate_rays(ray[, intercept_error])

rtype:

kgpy.optics.rays.RayVector

ray_intercept(ray[, intercept_error])

rtype:

kgpy.vectors.Cartesian3D

write_to_dxf(file_writer, unit[, ...])

rtype:

None

Inheritance Diagram

digraph inheritance5aedb06f9f { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "abc.ABC" [URL="https://docs.python.org/3/library/abc.html#abc.ABC",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Helper class that provides a standard way to create an ABC using"]; "kgpy.io.dxf.WritableMixin" [URL="kgpy.io.dxf.WritableMixin.html#kgpy.io.dxf.WritableMixin",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="WritableMixin()"]; "abc.ABC" -> "kgpy.io.dxf.WritableMixin" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Broadcastable" [URL="kgpy.mixin.Broadcastable.html#kgpy.mixin.Broadcastable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Class to help with determining the shape of the optical configuration."]; "kgpy.mixin.Copyable" [URL="kgpy.mixin.Copyable.html#kgpy.mixin.Copyable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "abc.ABC" -> "kgpy.mixin.Copyable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Dataframable" [URL="kgpy.mixin.Dataframable.html#kgpy.mixin.Dataframable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="This mixin class naively converts a child class to a :class:`pandas.Dataframe`."]; "kgpy.mixin.Named" [URL="kgpy.mixin.Named.html#kgpy.mixin.Named",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Named(name: str = '')"]; "kgpy.mixin.Copyable" -> "kgpy.mixin.Named" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Dataframable" -> "kgpy.mixin.Named" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Plottable" [URL="kgpy.mixin.Plottable.html#kgpy.mixin.Plottable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Plottable(plot_kwargs: Dict[str, Any] = <factory>)"]; "kgpy.mixin.Copyable" -> "kgpy.mixin.Plottable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "abc.ABC" -> "kgpy.mixin.Plottable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.optics.surfaces.Surface" [URL="kgpy.optics.surfaces.Surface.html#kgpy.optics.surfaces.Surface",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Interface for representing an optical surface."]; "kgpy.io.dxf.WritableMixin" -> "kgpy.optics.surfaces.Surface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Broadcastable" -> "kgpy.optics.surfaces.Surface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.transforms.Transformable" -> "kgpy.optics.surfaces.Surface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Plottable" -> "kgpy.optics.surfaces.Surface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Named" -> "kgpy.optics.surfaces.Surface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "abc.ABC" -> "kgpy.optics.surfaces.Surface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "typing.Generic" -> "kgpy.optics.surfaces.Surface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.transforms.Transformable" [URL="kgpy.transforms.Transformable.html#kgpy.transforms.Transformable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Transformable(transform: kgpy.transforms.TransformList = <factory>)"]; "typing.Generic" [URL="https://docs.python.org/3/library/typing.html#typing.Generic",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract base class for generic types."]; }
copy()
Return type:

typing.TypeVar(CopyableT, bound= Copyable)

Parameters:

self (CopyableT) –

copy_shallow()
Return type:

typing.TypeVar(CopyableT, bound= Copyable)

Parameters:

self (CopyableT) –

plot(ax, component_x='x', component_y='y', component_z='z', transform_extra=None, to_global=False, plot_annotations=True, annotation_text_y=1.05, **kwargs)
Return type:

typing.List[matplotlib.lines.Line2D]

Parameters:
  • ax (Axes) –

  • component_x (str) –

  • component_y (str) –

  • component_z (str) –

  • transform_extra (TransformList | None) –

  • to_global (bool) –

  • plot_annotations (bool) –

  • annotation_text_y (float) –

propagate_rays(ray, intercept_error=<Quantity 0.1 nm>)
Return type:

kgpy.optics.rays.RayVector

Parameters:
ray_intercept(ray, intercept_error=<Quantity 0.1 nm>)
Return type:

kgpy.vectors.Cartesian3D

Parameters:
write_to_dxf(file_writer, unit, transform_extra=None)
Return type:

None

Parameters:
  • self (SurfaceT) –

  • file_writer (R12FastStreamWriter) –

  • unit (Unit) –

  • transform_extra (TransformList | None) –

aperture: typing.Optional[typing.TypeVar(ApertureT, bound= apertures.Aperture)] = None

Aperture of this surface

aperture_mechanical: typing.Optional[typing.TypeVar(ApertureMechT, bound= apertures.Aperture)] = None

Mechanical aperture of this surface

baffle_loft_ids: typing.List[int]
property broadcasted
property dataframe: DataFrame
is_active: bool = True

Flag to disable the surface

is_field_stop: bool = False
is_pupil_stop: bool = False
is_pupil_stop_test: bool = False
is_visible: bool = True

Flag to disable plotting this surface

material: typing.Optional[typing.TypeVar(MaterialT, bound= materials.Material)] = None

Material type for this surface

name: str = ''
plot_kwargs: typing.Optional[typing.Dict[str, typing.Any]]
ruling: typing.Optional[typing.TypeVar(RulingT, bound= rulings.Ruling)] = None

Ruling profile of this surface

sag: typing.Optional[typing.TypeVar(SagT, bound= sags.Sag)] = None

Sag profile of this surface

property shape
transform: TransformList