System

class kgpy.optics.System(name=<factory>, plot_kwargs=<factory>, transform=<factory>, object_surface=<factory>, surfaces=<factory>, grid_rays=<factory>, field_margin=<Quantity 1. nrad>, pupil_margin=<Quantity 1. nm>, pointing=<factory>, roll=<Quantity 0. deg>, baffles_blank=<factory>, baffles_hull_axes=None, breadboard=None, tolerance_axes=<factory>, focus_axes=<factory>, distortion_polynomial_degree=2, vignetting_polynomial_degree=1)

Bases: WritableMixin, Transformable, Plottable, Broadcastable, Named

Parameters
__init__(name=<factory>, plot_kwargs=<factory>, transform=<factory>, object_surface=<factory>, surfaces=<factory>, grid_rays=<factory>, field_margin=<Quantity 1. nrad>, pupil_margin=<Quantity 1. nm>, pointing=<factory>, roll=<Quantity 0. deg>, baffles_blank=<factory>, baffles_hull_axes=None, breadboard=None, tolerance_axes=<factory>, focus_axes=<factory>, 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

error_no_stop

field_margin

Margin between edge of field and nearest ray

grid_rays_stop

psf_diffraction

pupil_margin

Margin between edge of pupil and nearest ray

rays_input

rays_input_resample_entrance

rays_output

rays_output_resample_entrance

raytrace

raytrace_resample_entrance

roll

shape

surface_stop

surfaces_all

tol_iter

transform_all

transform_pointing

transform_roll

vignetting_polynomial_degree

wavelength

object_surface

Surface representing the light source

surfaces

grid_rays

pointing

baffles_blank

tolerance_axes

focus_axes

Methods

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

calc_baffles(baffles_blank[, transform_extra])

rtype

kgpy.optics.baffle.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.System

plot(ax[, components, component_z, ...])

rtype

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

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

rtype

matplotlib.axes.Axes

plot_projections([surface_first, ...])

rtype

matplotlib.figure.Figure

print_surfaces()

rtype

typing.NoReturn

psf([bins, limit_min, limit_max, ...])

rtype

typing.Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]

update()

rtype

typing.NoReturn

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

rtype

None

Inheritance Diagram

Inheritance diagram of kgpy.optics.System

class Breadboard(color='gray', transform=<factory>, length=<Quantity 0. mm>, width=<Quantity 0. mm>, thickness=<Quantity 0. mm>)

Bases: Transformable, Colorable

Parameters
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=None, components=('x', 'y'), color='black', transform_extra=None, to_global=False)
Return type

matplotlib.axes.Axes

Parameters
color: str = 'gray'
length: astropy.units.Quantity = <Quantity 0. mm>
thickness: astropy.units.Quantity = <Quantity 0. mm>
property tol_iter: Iterator[Transformable]
transform: TransformList
width: astropy.units.Quantity = <Quantity 0. mm>
calc_baffles(baffles_blank, transform_extra=None)
Return type

kgpy.optics.baffle.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.System

Parameters
plot(ax, components=('x', 'y'), component_z=None, plot_kwargs=None, transform_extra=None, surface_first=None, surface_last=None, plot_rays=True, color_axis=-2, plot_vignetted=False, plot_colorbar=True, plot_baffles=True, plot_breadboard=True, plot_annotations=True, annotation_text_y=1.05)
Return type

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

Parameters
plot_footprint(ax=None, surf=None, color_axis=-2, plot_apertures=True, plot_vignetted=False)
Return type

matplotlib.axes.Axes

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

matplotlib.figure.Figure

Parameters
print_surfaces()
Return type

typing.NoReturn

psf(bins=10, limit_min=None, limit_max=None, use_vignetted=False, relative_to_centroid=(False, False))
Return type

typing.Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]

Parameters
update()
Return type

typing.NoReturn

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

None

Parameters
  • self (SystemT) –

  • file_writer (R12FastStreamWriter) –

  • unit (Unit) –

  • transform_extra (Optional[Transform]) –

property baffle_lofts: Dict[int, Tuple[Surface, Surface]]
property baffles: BaffleList
baffles_blank: kgpy.optics.baffle.BaffleList
baffles_hull_axes: typing.Optional[typing.Tuple[int, ...]] = None
breadboard: typing.Optional[kgpy.optics.breadboard.Breadboard] = None
property broadcasted
property dataframe: DataFrame
distortion_polynomial_degree: int = 2
error_no_stop = ValueError('no stop defined')
field_margin: astropy.units.Quantity = <Quantity 1. nrad>

Margin between edge of field and nearest ray

focus_axes: typing.Dict[str, int]
grid_rays: kgpy.optics.rays.RayGrid
property grid_rays_stop: RayGrid
name: Name
object_surface: kgpy.optics.surface.Surface

Surface representing the light source

plot_kwargs: typ.Dict[str, typ.Any]
pointing: kgpy.vector.Vector2D
property psf_diffraction: DiscretePSF
pupil_margin: astropy.units.Quantity = <Quantity 1. nm>

Margin between edge of pupil and nearest ray

property rays_input: Rays
property rays_input_resample_entrance: Rays
property rays_output: Rays
property rays_output_resample_entrance: Rays
property raytrace: RaysList
property raytrace_resample_entrance: RaysList
roll: astropy.units.Quantity = <Quantity 0. deg>
property shape
property surface_stop
surfaces: kgpy.optics.surface.SurfaceList
property surfaces_all: SurfaceList
property tol_iter: Iterator[System]
tolerance_axes: typing.Dict[str, int]
transform: TransformList
property transform_all: TransformList
property transform_pointing: TransformList
property transform_roll: TransformList
vignetting_polynomial_degree: int = 1
property wavelength: Quantity