Baffle

class kgpy.optics.baffles.Baffle(name='', transform=<factory>, plot_kwargs=<factory>, apertures_base=<factory>, apertures_extra=<factory>, obscuration_base=None, margin=<Quantity 1. mm>, min_distance=<Quantity 2. mm>, combined_axes=None, shapely_unit=Unit("mm"), buffer_cap_style=BufferCapStyle.square, buffer_join_style=BufferJoinStyle.mitre)

Bases: Broadcastable, Plottable, Transformable, Named, Generic[ObscurationT]

Parameters:
__init__(name='', transform=<factory>, plot_kwargs=<factory>, apertures_base=<factory>, apertures_extra=<factory>, obscuration_base=None, margin=<Quantity 1. mm>, min_distance=<Quantity 2. mm>, combined_axes=None, shapely_unit=Unit("mm"), buffer_cap_style=BufferCapStyle.square, buffer_join_style=BufferJoinStyle.mitre)
Parameters:
Return type:

None

Attributes

apertures

broadcasted

buffer_cap_style

buffer_join_style

buffer_resolution

combined_axes

dataframe

interiors

margin

min_distance

name

obscuration

obscuration_base

shape

shapely_unit

apertures_base

apertures_extra

plot_kwargs

transform

Methods

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

concat_apertures(apertures)

rtype:

kgpy.optics.baffles.Baffle

concat_apertures_from_global_positions(...)

concat_apertures_from_intercept(intercept, mask)

rtype:

kgpy.optics.baffles.Baffle

concat_apertures_from_lofts(lofts[, ...])

rtype:

kgpy.optics.baffles.Baffle

concat_apertures_from_raytrace(raytrace[, ...])

rtype:

kgpy.optics.baffles.Baffle

copy()

rtype:

typing.TypeVar(CopyableT, bound= Copyable)

copy_shallow()

rtype:

typing.TypeVar(CopyableT, bound= Copyable)

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

rtype:

matplotlib.axes._axes.Axes

to_dxf(filename[, dxf_unit])

unary_union(other)

Inheritance Diagram

digraph inheritance347d8d8dc2 { 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.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.baffles.Baffle" [URL="kgpy.optics.baffles.Baffle.html#kgpy.optics.baffles.Baffle",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="Baffle(name: str = '', transform: kgpy.transforms.TransformList = <factory>, plot_kwargs: Dict[str, Any] = <factory>, apertures_base: List[kgpy.optics.apertures.IrregularPolygon] = <factory>, apertures_extra: List[kgpy.optics.apertures.Aperture] = <factory>, obscuration_base: Optional[~ObscurationT] = None, margin: astropy.units.quantity.Quantity = <Quantity 1. mm>, min_distance: astropy.units.quantity.Quantity = <Quantity 2. mm>, combined_axes: Optional[Sequence[int]] = None, shapely_unit: astropy.units.core.Unit = Unit(\"mm\"), buffer_cap_style: int = <BufferCapStyle.square: 3>, buffer_join_style: int = <BufferJoinStyle.mitre: 2>)"]; "kgpy.mixin.Broadcastable" -> "kgpy.optics.baffles.Baffle" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Plottable" -> "kgpy.optics.baffles.Baffle" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.transforms.Transformable" -> "kgpy.optics.baffles.Baffle" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Named" -> "kgpy.optics.baffles.Baffle" [arrowsize=0.5,style="setlinewidth(0.5)"]; "typing.Generic" -> "kgpy.optics.baffles.Baffle" [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."]; }
concat_apertures(apertures)
Return type:

kgpy.optics.baffles.Baffle

Parameters:

apertures (List[IrregularPolygon]) –

concat_apertures_from_global_positions(position_1, position_2, mask=None, hull_axes=None, color='black')
Parameters:
Return type:

Baffle

concat_apertures_from_intercept(intercept, mask, hull_axes=None, color='black')
Return type:

kgpy.optics.baffles.Baffle

Parameters:
concat_apertures_from_lofts(lofts, transform_extra=None, color='black')
Return type:

kgpy.optics.baffles.Baffle

Parameters:
concat_apertures_from_raytrace(raytrace, transform_extra=None, hull_axes=None, color='black')
Return type:

kgpy.optics.baffles.Baffle

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, component_x='x', component_y='y', component_z='z', transform_extra=None, to_global=False, plot_apertures_base=False, **kwargs)
Return type:

matplotlib.axes._axes.Axes

Parameters:
  • ax (Axes | None) –

  • component_x (str) –

  • component_y (str) –

  • component_z (str) –

  • transform_extra (TransformList | None) –

  • to_global (bool) –

  • plot_apertures_base (bool) –

to_dxf(filename, dxf_unit=Unit('inch'))
Parameters:
  • filename (Path) –

  • dxf_unit (Unit) –

unary_union(other)
Parameters:

other (Baffle) –

property apertures
apertures_base: typing.List[kgpy.optics.apertures.IrregularPolygon]
apertures_extra: typing.List[kgpy.optics.apertures.Aperture]
property broadcasted
buffer_cap_style: int = 3
buffer_join_style: int = 2
buffer_resolution = 1
combined_axes: typing.Optional[typing.Sequence[int]] = None
property dataframe: DataFrame
property interiors: MultiPolygon
margin: astropy.units.quantity.Quantity = <Quantity 1. mm>
min_distance: astropy.units.quantity.Quantity = <Quantity 2. mm>
name: str = ''
property obscuration
obscuration_base: typing.Optional[typing.TypeVar(ObscurationT, bound= kgpy.optics.apertures.Polygon)] = None
plot_kwargs: typ.Dict[str, typ.Any]
property shape
shapely_unit: astropy.units.core.Unit = Unit("mm")
transform: TransformList