xopto.mcml.mcdetector.probe.fiberarraypl module

class FiberArrayPl(fibers: List[xopto.mcbase.mcutil.fiber.FiberLayout], plaxis: Optional[xopto.mcbase.mcutil.axis.Axis] = None)[source]

Bases: xopto.mcml.mcdetector.base.Detector

Optical fiber probe detector with an 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
  • fibers (List[FiberLayout]) – List of optical fiber configuration that form the fiber array.

  • plaxis (axis.Axis) – Object that defines the accumulators along the optical path length axis (this axis supports log-scale).

check()[source]

Check if the configuration has errors and raise exceptions if so.

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 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 FiberArrayPl.cl_type() method for a detailed list of fields.

Parameters
Returns

target – Filled structure received as an input argument or a new instance if the input argument target is None.

Return type

cltypes.Structure

cl_type(mc: xopto.mcbase.mcobject.McObject)xopto.cl.cltypes.Structure[source]
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)

property fibers: List[xopto.mcbase.mcutil.fiber.FiberLayout]

List of optical fibers.

static fromdict(data: dict)xopto.mcml.mcdetector.probe.fiberarraypl.FiberArrayPl[source]

Create an accumulator instance from a dictionary.

Parameters

data (dict) – Dictionary created by the FiberArrayPl.todict() method.

property n: int

Number of optical fiber in the array.

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 reflectance: numpy.ndarray

Reflectance.

todict()dict[source]

Save the accumulator configuration without the accumulator data to a dictionary. Use the FiberArrayPl.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.mcml.mcdetector.probe.fiberarraypl.FiberArrayPl)[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 (FiberArrayPl or dict) – This source is updated with the configuration of the other source.