System

class kgpy.optics.systems.System(name='', plot_kwargs=<factory>, transform=<factory>, transform_pointing=<factory>, object_surface=<factory>, surfaces=<factory>, object_grid_normalized=<factory>, resample_over_entrance=True, field_margin=<Quantity 1. nm>, pupil_margin=<Quantity 1. nm>, baffles_blank=<factory>, baffles_hull_axes=None, breadboard=None, distortion_polynomial_degree=2, vignetting_polynomial_degree=1)

Bases: WritableMixin, Transformable, Plottable, Broadcastable, Named

Model of an optical system.

Parameters:
__init__(name='', plot_kwargs=<factory>, transform=<factory>, transform_pointing=<factory>, object_surface=<factory>, surfaces=<factory>, object_grid_normalized=<factory>, resample_over_entrance=True, field_margin=<Quantity 1. nm>, pupil_margin=<Quantity 1. nm>, baffles_blank=<factory>, baffles_hull_axes=None, breadboard=None, distortion_polynomial_degree=2, vignetting_polynomial_degree=1)
Parameters:
Return type:

None

Attributes

baffle_lofts

baffles

baffles_hull_axes

breadboard

broadcasted

dataframe

distortion_polynomial_degree

field_margin

Margin between edge of field and nearest ray

field_stop

interpolated

name

psf_diffraction

pupil_margin

Margin between edge of pupil and nearest ray

pupil_stop

rays_input

rays_output

raytrace

resample_over_entrance

shape

surfaces_all

transform_all

vignetting_polynomial_degree

wavelength

transform_pointing

Surface representing the light source

object_surface

surfaces

object_grid_normalized

baffles_blank

transform

plot_kwargs

Methods

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

calc_baffles(baffles_blank[, transform_extra])

rtype:

kgpy.optics.baffles.BaffleList

copy()

rtype:

typing.TypeVar(CopyableT, bound= Copyable)

copy_shallow()

rtype:

typing.TypeVar(CopyableT, bound= Copyable)

generic_fit(observed_images, target_images, ...)

rtype:

kgpy.optics.systems.System

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

rtype:

typing.Tuple[typing.List[matplotlib.lines.Line2D], typing.Optional[matplotlib.colorbar.Colorbar]]

plot_footprint([ax, surf, color_axis, ...])

rtype:

typing.Tuple[typing.List[matplotlib.lines.Line2D], typing.List[matplotlib.collections.PathCollection], matplotlib.cm.ScalarMappable]

plot_projections([surface_first, ...])

rtype:

matplotlib.figure.Figure

print_surfaces()

rtype:

typing.NoReturn

update()

rtype:

None

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

rtype:

None

Inheritance Diagram

digraph inheritance50a219263e { 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.systems.System" [URL="kgpy.optics.systems.System.html#kgpy.optics.systems.System",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="Model of an optical system."]; "kgpy.io.dxf.WritableMixin" -> "kgpy.optics.systems.System" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.transforms.Transformable" -> "kgpy.optics.systems.System" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Plottable" -> "kgpy.optics.systems.System" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Broadcastable" -> "kgpy.optics.systems.System" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Named" -> "kgpy.optics.systems.System" [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>)"]; }
calc_baffles(baffles_blank, transform_extra=None)
Return type:

kgpy.optics.baffles.BaffleList

Parameters:
copy()
Return type:

typing.TypeVar(CopyableT, bound= Copyable)

Parameters:

self (CopyableT) –

copy_shallow()
Return type:

typing.TypeVar(CopyableT, bound= Copyable)

Parameters:

self (CopyableT) –

generic_fit(observed_images, target_images, target_images_min, target_images_max, factory, params_guess=None, params_min=None, params_max=None, use_correlate=False, x_axis=-3, y_axis=-2, w_axis=-1)
Return type:

kgpy.optics.systems.System

Parameters:
plot(ax, component_x='z', component_y='x', component_z='y', transform_extra=None, surface_first=None, surface_last=None, plot_rays=True, color_axis='wavelength_base', plot_vignetted=False, plot_colorbar=True, plot_baffles=True, plot_breadboard=True, plot_annotations=True, annotation_text_y=1.05, **kwargs)
Return type:

typing.Tuple[typing.List[matplotlib.lines.Line2D], typing.Optional[matplotlib.colorbar.Colorbar]]

Parameters:
  • ax (Axes) –

  • component_x (str) –

  • component_y (str) –

  • component_z (str) –

  • transform_extra (TransformList | None) –

  • surface_first (Surface | None) –

  • surface_last (Surface | None) –

  • plot_rays (bool) –

  • color_axis (str) –

  • plot_vignetted (bool) –

  • plot_colorbar (bool) –

  • plot_baffles (bool) –

  • plot_breadboard (bool) –

  • plot_annotations (bool) –

  • annotation_text_y (float) –

plot_footprint(ax=None, surf=None, color_axis='wavelength_rest', plot_apertures=True, plot_vignetted=False, index=None)
Return type:

typing.Tuple[typing.List[matplotlib.lines.Line2D], typing.List[matplotlib.collections.PathCollection], matplotlib.cm.ScalarMappable]

Parameters:
plot_projections(surface_first=None, surface_last=None, color_axis='spectral_line', plot_vignetted=False, plot_rays=True)
Return type:

matplotlib.figure.Figure

Parameters:
  • surface_first (Surface | None) –

  • surface_last (Surface | None) –

  • color_axis (str) –

  • plot_vignetted (bool) –

  • plot_rays (bool) –

print_surfaces()
Return type:

typing.NoReturn

update()
Return type:

None

Parameters:

self (SystemT) –

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

None

Parameters:
  • self (SystemT) –

  • file_writer (R12FastStreamWriter) –

  • unit (Unit) –

  • transform_extra (TransformList | None) –

property baffle_lofts: Dict[int, Tuple[Surface, Surface]]
property baffles: BaffleList
baffles_blank: BaffleList
baffles_hull_axes: typ.Optional[typ.Tuple[int, ...]] = None
breadboard: typ.Optional[Breadboard] = None
property broadcasted
property dataframe: DataFrame
distortion_polynomial_degree: int = 2
field_margin: u.Quantity = <Quantity 1. nm>

Margin between edge of field and nearest ray

property field_stop: Surface
property interpolated: InterpolatedSystem
name: str = ''
object_grid_normalized: vectors.ObjectVector
object_surface: Surface
plot_kwargs: typ.Dict[str, typ.Any]
property psf_diffraction: PointSpread
pupil_margin: u.Quantity = <Quantity 1. nm>

Margin between edge of pupil and nearest ray

property pupil_stop: Surface
property rays_input: RayFunction
property rays_output: RayFunction
property raytrace: RayFunctionList
resample_over_entrance: bool = True
property shape
surfaces: SurfaceList
property surfaces_all: SurfaceList
transform: TransformList
property transform_all: TransformList
transform_pointing: transforms.TransformList

Surface representing the light source

vignetting_polynomial_degree: int = 1
property wavelength: Quantity