RayVector¶
- class kgpy.optics.rays.RayVector(transform=<factory>, intensity=<Quantity 1.>, position=<factory>, direction=<factory>, polarization=<factory>, wavelength=<Quantity 0. nm>, index_refraction=<Quantity 1.>, surface_normal=<factory>, mask=<factory>)¶
Bases:
Transformable,AbstractVector- Parameters:
transform (TransformList) –
intensity (int | float | ndarray | Quantity | AbstractArray | AbstractArray) –
position (Cartesian3D) –
direction (Cartesian3D) –
polarization (StokesVector) –
wavelength (int | float | ndarray | Quantity | AbstractArray | AbstractArray) –
index_refraction (int | float | ndarray | Quantity | AbstractArray | AbstractArray) –
surface_normal (Cartesian3D) –
mask (int | float | ndarray | Quantity | AbstractArray | AbstractArray) –
- __init__(transform=<factory>, intensity=<Quantity 1.>, position=<factory>, direction=<factory>, polarization=<factory>, wavelength=<Quantity 0. nm>, index_refraction=<Quantity 1.>, surface_normal=<factory>, mask=<factory>)¶
- Parameters:
transform (TransformList) –
intensity (int | float | ndarray | Quantity | AbstractArray | AbstractArray) –
position (Cartesian3D) –
direction (Cartesian3D) –
polarization (StokesVector) –
wavelength (int | float | ndarray | Quantity | AbstractArray | AbstractArray) –
index_refraction (int | float | ndarray | Quantity | AbstractArray | AbstractArray) –
surface_normal (Cartesian3D) –
mask (int | float | ndarray | Quantity | AbstractArray | AbstractArray) –
- Return type:
None
Attributes
Methods
__init__([transform, intensity, position, ...])add_axes(axes)- rtype:
typing.TypeVar(VectorInterfaceT, bound= VectorInterface)
aligned(shape)- rtype:
typing.TypeVar(AbstractVectorT, bound= AbstractVector)
all([axis, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
any([axis, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
apply_transform(transform)- rtype:
typing.TypeVar(RayVectorT, bound= RayVector)
astype(dtype[, order, casting, subok, copy])- rtype:
typing.TypeVar(VectorInterfaceT, bound= VectorInterface)
broadcast_to(shape)- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
combine_axes(axes[, axis_new])- rtype:
typing.TypeVar(VectorInterfaceT, bound= VectorInterface)
copy()- rtype:
typing.TypeVar(CopyableT, bound= Copyable)
- rtype:
typing.TypeVar(CopyableT, bound= Copyable)
from_coordinates(coordinates)- rtype:
typing.TypeVar(AbstractVectorT, bound= AbstractVector)
from_field_angles(scene_vector, position)index(value[, axis])- rtype:
typing.Dict[str,typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]
index_below_brute(value[, axis])- rtype:
typing.Dict[str,typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]
index_nearest_brute(value[, axis, where])- rtype:
typing.Dict[str,typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]
index_nearest_secant(value[, axis])- rtype:
index_secant(value[, axis, damping])- rtype:
typing.Dict[str,typing.TypeVar(ArrayT, bound= Array)]
interp_linear(item)linear_space(start, stop, num[, endpoint])- rtype:
typing.TypeVar(AbstractVectorT, bound= AbstractVector)
max([axis, initial, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
mean([axis, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
min([axis, initial, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
ndindex([axis_ignored])- rtype:
outer(other)- rtype:
typing.TypeVar(AbstractMatrixT, bound= AbstractMatrix)
plot(ax, axis_plot, **kwargs)- rtype:
plot_filled(ax, axis_plot, **kwargs)- rtype:
typing.Type[typing.TypeVar(AbstractVectorT, bound= AbstractVector)]
ptp([axis])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
reshape(shape)- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
rms([axis, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
std([axis, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
stratified_random_space(start, stop, num, axis)- rtype:
typing.TypeVar(AbstractVectorT, bound= AbstractVector)
sum([axis, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
to(unit)- rtype:
typing.TypeVar(AbstractVectorT, bound= AbstractVector)
- rtype:
typing.TypeVar(AbstractMatrixT, bound= AbstractMatrix)
Inheritance Diagram
digraph inheritancecf38bbe54a { 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.labeled.ArrayInterface" [URL="kgpy.labeled.ArrayInterface.html#kgpy.labeled.ArrayInterface",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="ArrayInterface()"]; "kgpy.mixin.Copyable" -> "kgpy.labeled.ArrayInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.labeled.NDArrayMethodsMixin" -> "kgpy.labeled.ArrayInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "numpy.lib.mixins.NDArrayOperatorsMixin" -> "kgpy.labeled.ArrayInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "abc.ABC" -> "kgpy.labeled.ArrayInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "typing.Generic" -> "kgpy.labeled.ArrayInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.labeled.NDArrayMethodsMixin" [URL="kgpy.labeled.NDArrayMethodsMixin.html#kgpy.labeled.NDArrayMethodsMixin",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="NDArrayMethodsMixin()"]; "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.optics.rays.RayVector" [URL="kgpy.optics.rays.RayVector.html#kgpy.optics.rays.RayVector",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="RayVector(transform: kgpy.transforms.TransformList = <factory>, intensity: Union[int, float, numpy.ndarray, astropy.units.quantity.Quantity, kgpy.labeled.AbstractArray, kgpy.uncertainty.AbstractArray] = <Quantity 1.>, position: kgpy.vectors.Cartesian3D = <factory>, direction: kgpy.vectors.Cartesian3D = <factory>, polarization: kgpy.optics.vectors.StokesVector = <factory>, wavelength: Union[int, float, numpy.ndarray, astropy.units.quantity.Quantity, kgpy.labeled.AbstractArray, kgpy.uncertainty.AbstractArray] = <Quantity 0. nm>, index_refraction: Union[int, float, numpy.ndarray, astropy.units.quantity.Quantity, kgpy.labeled.AbstractArray, kgpy.uncertainty.AbstractArray] = <Quantity 1.>, surface_normal: kgpy.vectors.Cartesian3D = <factory>, mask: Union[int, float, numpy.ndarray, astropy.units.quantity.Quantity, kgpy.labeled.AbstractArray, kgpy.uncertainty.AbstractArray] = <factory>)"]; "kgpy.transforms.Transformable" -> "kgpy.optics.rays.RayVector" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.vectors.AbstractVector" -> "kgpy.optics.rays.RayVector" [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>)"]; "kgpy.vectors.AbstractVector" [URL="kgpy.vectors.AbstractVector.html#kgpy.vectors.AbstractVector",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="AbstractVector()"]; "kgpy.vectors.VectorInterface" -> "kgpy.vectors.AbstractVector" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.vectors.VectorInterface" [URL="kgpy.vectors.VectorInterface.html#kgpy.vectors.VectorInterface",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="VectorInterface()"]; "kgpy.labeled.ArrayInterface" -> "kgpy.vectors.VectorInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "numpy.lib.mixins.NDArrayOperatorsMixin" [URL="https://numpy.org/doc/stable/reference/generated/numpy.lib.mixins.NDArrayOperatorsMixin.html#numpy.lib.mixins.NDArrayOperatorsMixin",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="Mixin defining all operator special methods using __array_ufunc__."]; "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."]; }- add_axes(axes)¶
- Return type:
typing.TypeVar(VectorInterfaceT, bound= VectorInterface)- Parameters:
self (VectorInterfaceT) –
axes (List) –
- aligned(shape)¶
- Return type:
typing.TypeVar(AbstractVectorT, bound= AbstractVector)- Parameters:
- all(axis=None, where=<no value>)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- any(axis=None, where=<no value>)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- apply_transform(transform)¶
- Return type:
typing.TypeVar(RayVectorT, bound= RayVector)- Parameters:
transform (TransformList) –
- astype(dtype, order='K', casting='unsafe', subok=True, copy=True)¶
- Return type:
typing.TypeVar(VectorInterfaceT, bound= VectorInterface)- Parameters:
- broadcast_to(shape)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- combine_axes(axes, axis_new=None)¶
- Return type:
typing.TypeVar(VectorInterfaceT, bound= VectorInterface)- Parameters:
- copy()¶
- Return type:
typing.TypeVar(CopyableT, bound= Copyable)- Parameters:
self (CopyableT) –
- copy_shallow()¶
- Return type:
typing.TypeVar(CopyableT, bound= Copyable)- Parameters:
self (CopyableT) –
- classmethod from_coordinates(coordinates)¶
- Return type:
typing.TypeVar(AbstractVectorT, bound= AbstractVector)- Parameters:
coordinates (Dict[str, int | float | ndarray | Quantity | AbstractArray | AbstractArray | VectorInterface]) –
- classmethod from_field_angles(scene_vector, position)¶
- Parameters:
scene_vector (ObjectVector) –
position (Cartesian3D) –
- index(value, axis=None)¶
- Return type:
typing.Dict[str,typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]- Parameters:
- index_below_brute(value, axis=None)¶
- Return type:
typing.Dict[str,typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]- Parameters:
- index_nearest_brute(value, axis=None, where=None)¶
- Return type:
typing.Dict[str,typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]- Parameters:
- index_nearest_secant(value, axis=None)¶
- Return type:
- Parameters:
- index_secant(value, axis=None, damping=1)¶
- Return type:
typing.Dict[str,typing.TypeVar(ArrayT, bound= Array)]- Parameters:
- interp_linear(item)¶
- Parameters:
self (AbstractVectorT) –
item (Dict[str, int | float | ndarray | Quantity | AbstractArray | AbstractArray | VectorInterface]) –
- classmethod linear_space(start, stop, num, endpoint=True)¶
- Return type:
typing.TypeVar(AbstractVectorT, bound= AbstractVector)- Parameters:
start (AbstractVectorT) –
stop (AbstractVectorT) –
num (AbstractVectorT) –
endpoint (bool) –
- max(axis=None, initial=None, where=<no value>)¶
- mean(axis=None, where=<no value>)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- min(axis=None, initial=None, where=<no value>)¶
- ndindex(axis_ignored=None)¶
- Return type:
- Parameters:
- outer(other)¶
- Return type:
typing.TypeVar(AbstractMatrixT, bound= AbstractMatrix)- Parameters:
self (AbstractVectorT) –
other (AbstractVectorT) –
- plot(ax, axis_plot, **kwargs)¶
- Return type:
- Parameters:
- plot_filled(ax, axis_plot, **kwargs)¶
- Return type:
- Parameters:
- classmethod prototype()¶
- Return type:
typing.Type[typing.TypeVar(AbstractVectorT, bound= AbstractVector)]
- ptp(axis=None)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- reshape(shape)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- rms(axis=None, where=<no value>)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- std(axis=None, where=<no value>)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- classmethod stratified_random_space(start, stop, num, axis, endpoint=True, shape_extra=None)¶
- Return type:
typing.TypeVar(AbstractVectorT, bound= AbstractVector)- Parameters:
- sum(axis=None, where=<no value>)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- to(unit)¶
- Return type:
typing.TypeVar(AbstractVectorT, bound= AbstractVector)- Parameters:
self (AbstractVectorT) –
unit (UnitBase) –
- to_matrix()¶
- Return type:
typing.TypeVar(AbstractMatrixT, bound= AbstractMatrix)- Parameters:
self (AbstractVectorT) –
- property angles: Cartesian2D¶
- property array_labeled: ArrayInterface¶
- property broadcasted: ArrayInterfaceT¶
- property centers: AbstractVectorT¶
- property component_sum: int | float | ndarray | Quantity | AbstractArray | AbstractArray¶
- property coordinates: Dict[str, int | float | ndarray | Quantity | AbstractArray | AbstractArray | VectorInterface]¶
-
direction:
kgpy.vectors.Cartesian3D¶
- property dtype¶
- property energy: int | float | ndarray | Quantity | AbstractArray | AbstractArray¶
-
index_refraction:
typing.Union[int,float,numpy.ndarray,astropy.units.quantity.Quantity,kgpy.labeled.AbstractArray,kgpy.uncertainty.AbstractArray] = <Quantity 1.>¶
-
intensity:
typing.Union[int,float,numpy.ndarray,astropy.units.quantity.Quantity,kgpy.labeled.AbstractArray,kgpy.uncertainty.AbstractArray] = <Quantity 1.>¶
- property length: int | float | ndarray | Quantity | AbstractArray | AbstractArray¶
-
mask:
typing.Union[int,float,numpy.ndarray,astropy.units.quantity.Quantity,kgpy.labeled.AbstractArray,kgpy.uncertainty.AbstractArray]¶
- property normalize: AbstractVectorT¶
- property normalized: VectorInterfaceT¶
-
polarization:
kgpy.optics.vectors.StokesVector¶
-
position:
kgpy.vectors.Cartesian3D¶
- property position_average_pupil: Cartesian3D¶
- property position_relative_pupil: Cartesian3D¶
- property spot_size_rms¶
-
surface_normal:
kgpy.vectors.Cartesian3D¶
- transform: TransformList¶
- property transformed: RayVectorT¶
- property tuple: Tuple[int | float | ndarray | Quantity | AbstractArray | AbstractArray | VectorInterface, ...]¶
- type_coordinates = (<class 'str'>, <class 'bool'>, <class 'int'>, <class 'float'>, <class 'complex'>, <class 'numpy.generic'>, <class 'numpy.ndarray'>, <class 'kgpy.labeled.AbstractArray'>, <class 'kgpy.uncertainty.AbstractArray'>)¶
- property type_matrix: Type[AbstractMatrix]¶
- property unit¶
-
wavelength:
typing.Union[int,float,numpy.ndarray,astropy.units.quantity.Quantity,kgpy.labeled.AbstractArray,kgpy.uncertainty.AbstractArray] = <Quantity 0. nm>¶