xopto.mcml.mcsurface.probe.lineararray module¶
- class LinearArray(fiber: xopto.mcbase.mcutil.fiber.MultimodeFiber, n=1, spacing: Optional[float] = None, orientation: Tuple[float, float] = (1.0, 0.0), diameter: float = 0.0, reflectivity: float = 0.0, cutout: Tuple[float, float] = (0.0, 0.0), cutoutn=1.0, position: Tuple[float, float] = (0.0, 0.0), direction: Tuple[float, float, float] = (0.0, 0.0, 1.0))[source]¶
Bases:
xopto.mcml.mcsurface.base.SurfaceLayoutAny
Optical fiber probe layout for a linear array of optical fibers that are optionally tilted (direction parameter). The optical fibers are always polished in a way that forms a tight optical contact with the surface of the sample.
- Parameters
fiber (MultimodeFiber) – Optical properties of the fibers. All optical fibers of the array are considered the same.
n (int) – The number of optical fibers in the linear array. This option is a compile-time feature and cannot be changed once the surface layout object is created.
spacing (float) – Spacing between the optical fibers. If spacing is None, a tight layout is used with spacing set to the outer diameter of the fiber cladding.
diameter (float) – Outer diameter of the optical fiber probe. Set to 0 if unused.
reflectivity (float) – Reflectivity of the optical fiber probe stainless steeel surface.
cutout ((float, float)) – Cutout size as a tuple (width, height). Setting any of the cutout width or height to 0 turns off the cutout. The cutout is rotated to match the orientation of the linear fiber array.
cutoutn (float) – Refractive index of the cutout. Used only if the cutout surface is nonzero.
orientation ((float, float)) – Vector that points in the direction of the linear fiber array. By default the fibers are place in the direction of x axis, i.e. vector (1.0, 0.0). The orientation must point in the direction from the first to the last optical fiber!
position ((float, float)) – Position of the center of the linear fiber array and of the opticalfiber probe.
direction ((float, float, float)) – Reference direction / orientation of the optical fibers. Fibers are oriented in this direction and polished to form a tight optical contact with the sample (the fiber cross sections are ellipsoids if the direction is not perpendicular, i.e different from (0, 0, 1).
- cl_declaration(mc: xopto.mcbase.mcobject.McObject) → str[source]¶
Structure that defines the surface layout in the Monte Carlo simulator.
- cl_implementation(mc: xopto.mcbase.mcobject.McObject) → str[source]¶
Implementation of the surface layout in the Monte Carlo simulator.
- cl_pack(mc: xopto.mcbase.mcobject.McObject, target: Optional[xopto.cl.cltypes.Structure] = None) → xopto.cl.cltypes.Structure[source]¶
Fills the structure (target) with the data required by the Monte Carlo simulator. See the
LinearArray.cl_type()
method for a detailed list of fields.- Parameters
mc (mcobject.McObject) – Monte Carlo simulator instance.
target (cltypes.Structure) – Ctypes structure that is filled with the source data.
- Returns
target – Filled structure received as an input argument or a new instance if the input argument target is None.
- Return type
- static cl_type(mc: xopto.mcbase.mcobject.McObject) → xopto.cl.cltypes.Structure[source]¶
- property cutout: Tuple[float, float]¶
Size of the cutout (width, height) that accommodates the optical fibers. Set to (0, 0) if unused.
- property cutoutn: float¶
Refractive index of the cutout fill.
- property diameter: float¶
Outer diameter of the optical fiber probe tip.
- property direction: Tuple[float, float, float]¶
Reference direction of the fibers in the layout.
- property fiber: Tuple[float, float]¶
Properties of the optical fibers used by the layout.
- fiber_position(index: int) → Tuple[float, float][source]¶
Returns the position of the fiber center as a tuple (x, y).
- Parameters
index (int) – Fiber index from 0 to n -1.
- Returns
position – The position of the fiber center as a tuple (x, y).
- Return type
(float, float)
- classmethod fromdict(data: dict) → xopto.mcml.mcsurface.probe.lineararray.LinearArray[source]¶
Create an accumulator instance from a dictionary.
- Parameters
data (dict) – Dictionary created by the
LinearArray.todict()
method.
- property n: int¶
Number of optical fiber in the linear array.
- property orientation: Tuple[float, float]¶
Orientation / direction of the linear fiber array.
- property position: Tuple[float, float]¶
Position of the fiber array center as a tuple (x, y).
- property reflectivity: float¶
Reflectivity of the stainless steel optical fiber probe tip.
- property spacing: float¶
Spacing between the centers of the optical fibers
- todict() → dict[source]¶
Save the surface layout configuration to a dictionary. Use the
LinearArray.fromdict()
method to create a new surface layout instance from the returned data.- Returns
data – Accumulator configuration as a dictionary.
- Return type
dict
- update(other: xopto.mcml.mcsurface.probe.lineararray.LinearArray)[source]¶
Update this surface layout configuration from the other surface layout. The other surface layout must be of the same type as this surface layout or a dict with appropriate fields.
- Parameters
other (LinearArray or dict) – This surface layout is updated with data from this parameter.