PistonComponent¶
- class kgpy.optics.components.PistonComponent(name='', plot_kwargs=<factory>, piston=<Quantity 0. mm>)¶
Bases:
Component[SurfaceT]- Parameters:
name (str) –
piston (int | float | ndarray | Quantity | AbstractArray | AbstractArray) –
- __init__(name='', plot_kwargs=<factory>, piston=<Quantity 0. mm>)¶
- Parameters:
name (str) –
piston (int | float | ndarray | Quantity | AbstractArray | AbstractArray) –
- Return type:
None
Attributes
Methods
__init__([name, plot_kwargs, piston])copy()- rtype:
typing.TypeVar(CopyableT, bound= Copyable)
- rtype:
typing.TypeVar(CopyableT, bound= Copyable)
plot(ax[, component_x, component_y, ...])- rtype:
Inheritance Diagram
digraph inheritancec49b6d670e { 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.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.components.Component" [URL="kgpy.optics.components.Component.html#kgpy.optics.components.Component",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="Component(name: str = '', plot_kwargs: Dict[str, Any] = <factory>)"]; "kgpy.mixin.Plottable" -> "kgpy.optics.components.Component" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.mixin.Named" -> "kgpy.optics.components.Component" [arrowsize=0.5,style="setlinewidth(0.5)"]; "abc.ABC" -> "kgpy.optics.components.Component" [arrowsize=0.5,style="setlinewidth(0.5)"]; "typing.Generic" -> "kgpy.optics.components.Component" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.optics.components.PistonComponent" [URL="kgpy.optics.components.PistonComponent.html#kgpy.optics.components.PistonComponent",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="PistonComponent(name: str = '', plot_kwargs: Dict[str, Any] = <factory>, piston: Union[int, float, numpy.ndarray, astropy.units.quantity.Quantity, kgpy.labeled.AbstractArray, kgpy.uncertainty.AbstractArray] = <Quantity 0. mm>)"]; "kgpy.optics.components.Component" -> "kgpy.optics.components.PistonComponent" [arrowsize=0.5,style="setlinewidth(0.5)"]; "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:
- Parameters:
-
piston:
typing.Union[int,float,numpy.ndarray,astropy.units.quantity.Quantity,kgpy.labeled.AbstractArray,kgpy.uncertainty.AbstractArray] = <Quantity 0. mm>¶
-
plot_kwargs:
typing.Dict[str,typing.Any]¶
- property surface: SurfaceT¶
- property transform: TransformList¶