xopto.mcml.mcdetector.symmetric module

class SymmetricX(xaxis: xopto.mcbase.mcutil.axis.SymmetricAxis, cosmin: float = 0.0, direction: Tuple[float, float, float] = (0.0, 0.0, 1.0))[source]

Bases: xopto.mcml.mcdetector.base.Detector

Symmetric reflectance-transmittance detector across the x axis.

Parameters
  • xaxis (axis.SymmetricAxis) – Object that defines the accumulators along the x axis (this axis supports log-scale).

  • cosmin (float) – Cosine of the maximum acceptance angle (relative to the reference direction of the detector).

  • direction ((float, float, float)) – Reference direction/orientation of the detector.

cl_declaration(mc: xopto.mcbase.mcobject.McObject)str[source]

Structure that defines the accumulator in the Monte Carlo simulator.

cl_implementation(mc: xopto.mcbase.mcobject.McObject)str[source]

Implementation of the accumulator in the Monte Carlo simulator.

cl_pack(mc: xopto.mcbase.mcobject.McObject, target: xopto.cl.cltypes.Structure)xopto.cl.cltypes.Structure[source]

Fills the structure (target) with the data required by the Monte Carlo simulator. See the SymmetricX.cl_type() method for a detailed list of fields.

Parameters
Returns

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

Return type

cltypes.Structure

static cl_type(mc: xopto.mcbase.mcobject.McObject)xopto.cl.cltypes.Structure[source]
property cosmin: float

Cosine of the maximum acceptance angle.

property direction: Tuple[float, float, float]

Detector reference direction.

property edges: numpy.ndarray

Edges of the accumulators.

static fromdict(data: dict)xopto.mcml.mcdetector.symmetric.SymmetricX[source]

Create an accumulator instance from a dictionary.

Parameters

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

property logscale: bool

Axis log scale.

property n: int

Number of accumulators.

property reflectance: numpy.ndarray

Reflectance.

todict()dict[source]

Save the accumulator configuration without the accumulator data to a dictionary. Use the SymmetricX.fromdict() method to create a new accumulator instance from the returned data.

Returns

data – Accumulator configuration as a dictionary.

Return type

dict

property transmittance

Transmittance.

property x: numpy.ndarray

Centers of the accumulators.

property xaxis: xopto.mcbase.mcutil.axis.SymmetricAxis

Axis object.