xopto.mcml.mcdetector.totalpl module¶
- class TotalLutPl(lut: xopto.mcbase.mcutil.lut.CollectionLut, plaxis: Optional[xopto.mcbase.mcutil.axis.Axis] = None, direction: Tuple[float, float, float] = (0.0, 0.0, 1.0))[source]¶
Bases:
xopto.mcml.mcdetector.base.Detector
Total reflectance-transmittance and optical path length detector with lookup table-based collection sensitivity.
- Parameters
lut (CollectionLut) –
- Lookup table of the detector angular sensitivity. The lookup table
is sampled with the absolute value of the incidence angle cosine compute relative to the detector reference direction.
plaxis (axis.Axis) – Object that defines the accumulators along the optical path length axis (this axis supports log-scale).
direction ((float, float, float)) – Reference direction/orientation of the detector.
Note
The detector sensitivity must be valid for packets inside the detector, since the photon packets are handeled by the detector after entering (refracting into) the detector itself.
- 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
TotalLutPl.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.
- static fromdict(data: dict) → xopto.mcml.mcdetector.totalpl.TotalLutPl[source]¶
Create an accumulator instance from a dictionary.
- Parameters
data (dict) – Dictionary created by the
TotalLutPl.todict()
method.
- property lut: xopto.mcbase.mcutil.lut.CollectionLut¶
Lookup table of the detector angular sensitivity.
- 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
TotalLutPl.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.
- class TotalPl(plaxis: Optional[xopto.mcbase.mcutil.axis.Axis] = None, cosmin: float = 0.0, direction: Tuple[float, float, float] = (0.0, 0.0, 1.0))[source]¶
Bases:
xopto.mcml.mcdetector.base.Detector
Total reflectance-transmittance and optical pathe length detector.
- Parameters
plaxis (axis.Axis or TotalPl) – Object that defines the accumulators along the optical path length axis (this axis supports log-scale). If an instance of TotalPl a new copy of TotalPl is created.
cosmin (float) – Cosine of the maximum acceptance angle (relative to the 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 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
TotalPl.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 cosmin: Tuple[float, float]¶
Cosine of the maximum acceptance angle.
- property direction: Tuple[float, float, float]¶
Detector reference direction.
- static fromdict(data: dict) → xopto.mcml.mcdetector.totalpl.TotalPl[source]¶
Create an accumulator instance from a dictionary.
- Parameters
data (dict) – Dictionary created by the
TotalPl.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 reflectance: numpy.ndarray¶
Reflectance.
- todict() → dict[source]¶
Save the accumulator configuration without the accumulator data to a dictionary. Use the
TotalPl.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.