xopto.mcvox.mcsource.voxel module

class IsotropicVoxel(voxel: Tuple[int, int, int])[source]

Bases: xopto.mcvox.mcsource.base.Source

Isotropic voxel source of photon packets.

Parameters

voxel ((int, int, int)) – Source voxel position as an integer array-like object of size 3 (ind_z, ind_y, ind_x).

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

Structure that defines the source in the Monte Carlo simulator.

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

Implementation of the source in the Monte Carlo simulator.

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

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

Parameters
  • mc (mcobject.McObject) – Monte Carlo simulator instance.

  • target (mcypes.Structure) – Ctypes structure that is filled with the source data.

Returns

  • target (mctypes.Structures) – Filled ctypes structure received as an input argument or a new instance if the input argument target is None.

  • topgeometry (None) – This source does not use advanced geometry at the top sample surface.

  • bottomgeometry (None) – This source does not use advanced geometry at the bottom sample surface.

static cl_type(mc: xopto.mcbase.mcobject.McObject)xopto.cl.cltypes.Structure[source]
todict()dict[source]

Export object to a dict.

update(other: xopto.mcvox.mcsource.voxel.IsotropicVoxel)[source]

Update this source configuration from the other source. The other source must be of the same type as this source or a dict with appropriate fields.

Parameters

other (xopto.mcvox.mcsource.voxel.IsotropicVoxel or dict) – This source is updated with the configuration of the other source.

property voxel: Tuple[int, int, int]

Source voxel indices.