xopto.mcml.mcdetector.radial module¶
- class Radial(raxis: xopto.mcbase.mcutil.axis.Axis, position: Tuple[float, float] = (0.0, 0.0), cosmin: float = 0.0, direction: Tuple[float, float, float] = (0.0, 0.0, 1.0))[source]¶
Bases:
xopto.mcml.mcdetector.base.Detector
Radial reflectance-transmittance accumulator.
- Parameters
raxis (axis.Axis or axis.RadialAxis) – Object that defines the accumulators along the radial axis (this axis supports log-scale).
position ((float, float)) – Position of the center of the radial accumulator.
cosmin (float) – Cosine of the maximum acceptance angle (relative to the direction of the detector) of the accumulator.
direction ((float, float, float)) – Reverence 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_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
Radial.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.
- property edges: numpy.ndarray¶
Edges of the accumulators.
- static fromdict(data)[source]¶
Create an accumulator instance from a dictionary.
- Parameters
data (dict) – Dictionary created by the
Radial.todict()
method.
- property logscale: bool¶
Axis scale.
- property n: int¶
Number of accumulators.
- property normalized: numpy.ndarray¶
Normalized.
- property position: Tuple[float, float]¶
Position of the radial accumulator as a tuple (x, y).
- property r: numpy.ndarray¶
Centers of the accumulators.
- property raxis: xopto.mcbase.mcutil.axis.Axis¶
Radial axis object.
- property reflectance: numpy.ndarray¶
Reflectance.
- todict()[source]¶
Save the accumulator configuration without the accumulator data to a dictionary. Use the
Radial.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.