xopto.mccyl.mcdetector.total module¶
- class Total(cosmin: float = 0.0)[source]¶
Bases:
xopto.mccyl.mcdetector.base.Detector
Total reflectance-transmittance detector.
- Parameters
cosmin (float) – Cosine of the maximum acceptance angle (relative to the surface normal) 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_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
Total.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.
- static fromdict(data: dict)[source]¶
Create an accumulator instance from a dictionary.
- Parameters
data (dict) – Dictionary created by the
Total.todict()
method.
- property normalized: numpy.ndarray¶
Normalized.
- property reflectance: numpy.ndarray¶
Reflectance.
- todict() → dict[source]¶
Save the accumulator configuration without the accumulator data to a dictionary. Use the
Total.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 TotalLut(lut: xopto.mcbase.mcutil.lut.CollectionLut)[source]¶
Bases:
xopto.mccyl.mcdetector.base.Detector
Total reflectance-transmittance detector.
- 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 sample surface normal.
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_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
TotalLut.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]¶
- static fromdict(data: dict)[source]¶
Create an accumulator instance from a dictionary.
- Parameters
data (dict) – Dictionary created by the
Total.todict()
method.
- property lut: xopto.mcbase.mcutil.lut.CollectionLut¶
Lookup table of the detector angular sensitivity.
- property normalized: numpy.ndarray¶
Normalized.
- property reflectance: numpy.ndarray¶
Reflectance.
- todict() → dict[source]¶
Save the accumulator configuration without the accumulator data to a dictionary. Use the
Total.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.