xopto.mcvox.mcdetector.probe.sixaroundonepl module¶
- class SixAroundOnePl(fiber: xopto.mcbase.mcutil.fiber.MultimodeFiber, spacing: Optional[float] = None, plaxis: Optional[xopto.mcbase.mcutil.axis.Axis] = None, position: Tuple[float, float] = (0.0, 0.0), direction: Tuple[float, float, float] = (0.0, 0.0, 1.0))[source]¶
Bases:
xopto.mcvox.mcdetector.base.Detector
A six-around one optical fiber probe detector with optional tilted fibers (direction parameter). The optical fibers are always polished in a way to form a tight optical contact with the surface of the sample.
- Parameters
fiber (MultimodeFiber) – Properties of the optical fibers.
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.
plaxis (axis.Axis) – Object that defines the accumulators along the optical path length axis (this axis supports log-scale).
position ((float, float)) – Position of the center of the probe / central finer.
direction ((float, float, float)) – Reference direction / orientation of the detector. 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).
Note
The first dimension of the accumulator represents the optical path length axis, the second dimension represents the optical fibers.
- cl_declaration(mc: xopto.mcbase.mcobject.McObject) → str[source]¶
Structure that defines the detector in the Monte Carlo simulator.
- cl_implementation(mc: xopto.mcbase.mcobject.McObject) → str[source]¶
Implementation of the detector accumulator in the Monte Carlo simulator.
- cl_options(mc, target=None) → List[Tuple[str, str]][source]¶
OpenCL kernel options defined by this object.
- 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
SixAroundOnePl.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 direction: Tuple[float, float, float]¶
Detector reference direction.
- property fiber: Tuple[float, float]¶
Properties of the optical fibers used by the detector.
- 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 6. Index zero corresponds to the central fiber. The remaining fibers are listed in a counter clockwise direction starting with the fiber located on the positive x axis.
- Returns
position – The position of the fiber center as a tuple (x, y).
- Return type
(float, float)
- static fromdict(data: dict)[source]¶
Create an accumulator instance from a dictionary.
- Parameters
data (dict) – Dictionary created by the
SixAroundOnePl.todict()
method.
- property normalized: numpy.ndarray¶
Normalized.
- property npl¶
Number of accumulators in the optical pathlength axis.
- property pl¶
Centers of the optical pathlength axis accumulators.
- property plaxis: xopto.mcbase.mcutil.axis.Axis¶
Path length axis object.
- property pledges¶
Edges of the optical pathlength axis accumulators.
- property position: Tuple[float, float]¶
Position of the detector as a tuple (x, y).
- property reflectance: numpy.ndarray¶
Reflectance.
- property spacing: float¶
Spacing between the centers of the central and six surrounding optical fiber.
- todict()[source]¶
Save the accumulator configuration without the accumulator data to a dictionary. Use the
SixAroundOnePl.fromdict()
method to create a new accumulator instance from the returned data.- Returns
data – Accumulator configuration as a dictionary.
- Return type
dict
- property transmittance: numpy.ndarray¶
Transmittance.
- update(other: xopto.mcvox.mcdetector.probe.sixaroundonepl.SixAroundOnePl)[source]¶
Update this detector configuration from the other detector. The other detector must be of the same type as this detector or a dict with appropriate fields.
- Parameters
other (SixAroundOnePl or dict) – This source is updated with the configuration of the other source.