GeometryObject¶
xicsrt.objects._GeometryObject.GeometryObject
New Members¶
-
class
GeometryObject
(config=None, strict=None, initialize=None)[source]¶ Bases:
xicsrt.objects._ConfigObject.ConfigObject
The base class for any geometrical objects used in XICSRT.Configuration Options:
- origin
- The x,y,x origin of this element in global coordinates.
- zaxis
- A unit-vector defining the z-axis of the element in global coordinates. For most optics: z-axis defines the surface normal direction.
- xaxis : (optional)
- A unit-vector defining the x-axis of the element in global coordinates. For most optics: x-axis defines the ‘width’ direction. If xaxis is not provided it will be automatically generated by: cross(zaxis, [0,1,0]). The yaxis is always automatically generated and defined by: cross(zaxis, xaxis)
- class_name
- Automatically generated.
- yo_mama
- Is a wonderful person!
-
default_config
()[source]¶ - origin
- The x,y,x origin of this element in global coordinates.
- zaxis
- A unit-vector defining the z-axis of the element in global coordinates. For most optics: z-axis defines the surface normal direction.
- xaxis (optional)
A unit-vector defining the x-axis of the element in global coordinates. For most optics: x-axis defines the ‘width’ direction.
If xaxis is not provided it will be automatically generated by: cross(zaxis, [0,1,0]).
The yaxis is always automatically generated and defined by: cross(zaxis, xaxis)
Inherited Members¶
-
class
GeometryObject
[source] -
__init__
(config=None, strict=None, initialize=None) Initialize self. See help(type(self)) for accurate signature.
-
aim_to_point
(aim_point, xaxis=None)[source] Set the Z-Axis to aim at a particular point.
-
check_config
() Check the config before copying to the internal param. This is called during object instantiation (__init__) and therefore before setup is called.
-
check_param
() Check the internal parameters prior to initialization. This will be called after setup and before initialize.
-
default_config
()[source] - origin
- The x,y,x origin of this element in global coordinates.
- zaxis
- A unit-vector defining the z-axis of the element in global coordinates. For most optics: z-axis defines the surface normal direction.
- xaxis (optional)
A unit-vector defining the x-axis of the element in global coordinates. For most optics: x-axis defines the ‘width’ direction.
If xaxis is not provided it will be automatically generated by: cross(zaxis, [0,1,0]).
The yaxis is always automatically generated and defined by: cross(zaxis, xaxis)
-
get_config
()
-
get_default_xaxis
(zaxis)[source] Get the X-axis using a default definition.
In order to fully define the orientation of a component both, a z-axis and an x-axis are expected. For certain types of components the x-axis definition is unimportant and can be defined using a default definition.
-
initialize
() Initialize the object.
-
point_to_external
(point_local)[source]
-
point_to_local
(point_external)[source]
-
ray_to_external
(ray_local, copy=False)[source]
-
ray_to_local
(ray_external, copy=False)[source]
-
set_orientation
(zaxis, xaxis=None)[source]
-
setup
()[source] Perform any setup actions that are needed prior to initialization.
-
to_ndarray
(vector_in)[source]
-
to_vector_array
(vector_in)[source] Convert a vector to a numpy vector array (if needed).
-
update_config
(config_new, **kwargs) Overwrite any config values in this object with the ones given. This will be done recursively for all nested dictionaries.
-
vector_to_external
(vector)[source]
-
vector_to_local
(vector)[source]
-