mpacts.predicates. lighttransport_predicates

In order to be able to use this module import it like this:

import mpacts.predicates.lighttransport_predicates
#or assign it to a shorter name
import mpacts.predicates.lighttransport_predicates as lig

BeyondEdge

class mpacts.predicates.lighttransport_predicates.BeyondEdge

Bases: mpacts.predicates.predicates.PredicateBase, mpacts.core.baseobject.BaseObject

Checks if a photon is beyond the xy-planes of the tissue-box.
Has no default location.
  • Required keywords:
    • box_x — x-coordinate of the edges of the sample
    • box_y — y-coordinate of the edges of the sample
  • Optional keywords:
    • allow_manager_change (default value = 0) — Boolean that decides whether or not a predicate will allow you to change the manager it is currently working on.This is a safety check, disable only when you know what you are doing.
    • child_predicate (default value = None) — child predicate
object __init__(tuple args, dict kwds) :
args: name, parent kwds: box_x, box_y, [child_predicate, allow_manager_change]
BeyondEdge(name, parent, **kwargs)

CheckInSphere

class mpacts.predicates.lighttransport_predicates.CheckInSphere

Bases: mpacts.predicates.predicates.PredicateBase, mpacts.core.baseobject.BaseObject

Checks if a photon is in (any) sphere (based on its own array set by a contact model!).
Has no default location.
  • Optional keywords:
    • allow_manager_change (default value = 0) — Boolean that decides whether or not a predicate will allow you to change the manager it is currently working on.This is a safety check, disable only when you know what you are doing.
    • child_predicate (default value = None) — child predicate
object __init__(tuple args, dict kwds) :
args: name, parent kwds: [child_predicate, allow_manager_change]
CheckInSphere(name, parent, **kwargs)

CrossBottomBoundary

class mpacts.predicates.lighttransport_predicates.CrossBottomBoundary

Bases: mpacts.predicates.predicates.PredicateBase, mpacts.core.baseobject.BaseObject

Checks if a photon is beyond the bottom boundary of the simulated domain.
Has no default location.
  • Required keywords:
    • Tolerance — Extra distance above top layer to make sure photons in sample are not regarded as transmittance.
    • bottom_sample — Bottom coordinate of the sample.
  • Optional keywords:
    • allow_manager_change (default value = 0) — Boolean that decides whether or not a predicate will allow you to change the manager it is currently working on.This is a safety check, disable only when you know what you are doing.
    • child_predicate (default value = None) — child predicate
object __init__(tuple args, dict kwds) :
args: name, parent kwds: bottom_sample, Tolerance, [child_predicate, allow_manager_change]
CrossBottomBoundary(name, parent, **kwargs)

CrossInternalLayer

class mpacts.predicates.lighttransport_predicates.CrossInternalLayer

Bases: mpacts.predicates.predicates.PredicateBase, mpacts.core.baseobject.BaseObject

Checks if a photon crosses the interface between two internal layers.
Has no default location.
  • Optional keywords:
    • allow_manager_change (default value = 0) — Boolean that decides whether or not a predicate will allow you to change the manager it is currently working on.This is a safety check, disable only when you know what you are doing.
    • child_predicate (default value = None) — child predicate
object __init__(tuple args, dict kwds) :
args: name, parent kwds: [child_predicate, allow_manager_change]
CrossInternalLayer(name, parent, **kwargs)

CrossTopBoundary

class mpacts.predicates.lighttransport_predicates.CrossTopBoundary

Bases: mpacts.predicates.predicates.PredicateBase, mpacts.core.baseobject.BaseObject

Checks if a photon is beyond the top boundary of the simulated domain.
Has no default location.
  • Required keywords:
    • Tolerance — Extra distance above top layer to make sure photons in sample are not regarded as reflection.
    • top_sample — Top coordinate of the sample.
  • Optional keywords:
    • allow_manager_change (default value = 0) — Boolean that decides whether or not a predicate will allow you to change the manager it is currently working on.This is a safety check, disable only when you know what you are doing.
    • child_predicate (default value = None) — child predicate
object __init__(tuple args, dict kwds) :
args: name, parent kwds: top_sample, Tolerance, [child_predicate, allow_manager_change]
CrossTopBoundary(name, parent, **kwargs)

InitPhotonLaunch

class mpacts.predicates.lighttransport_predicates.InitPhotonLaunch

Bases: mpacts.predicates.predicates.PredicateBase, mpacts.core.baseobject.BaseObject

When activated (e.g. by ‘Recycle’), initializes new photons in a disk with given radius and normal direction, with a distribution that is user-specified as [center:0, uniform on disk:1 gaussian around center:2, uniform on surface:3]. The initial direction of the packets can optionally be randomized.
Has no default location.
  • Required keywords:
    • fiber_radius — Radius of the fiber.
    • n0 — Refractive index of top layer
  • Optional keywords:
    • StoreSpecRef (default value = 0) — Variable that stores all the specular reflectance
    • allow_manager_change (default value = 0) — Boolean that decides whether or not a predicate will allow you to change the manager it is currently working on.This is a safety check, disable only when you know what you are doing.
    • box_size (default value = 1e+10 1e+10 1e+10) — Vector which contains the dimensions of the box
    • child_predicate (default value = None) — child predicate
    • diffuse (default value = 0) — Set to 1 to randomise the incoming direction of the light
    • distribution (default value = 0) — Distribution of the new packets in the fiber.[0=Point, 1=Uniform, 2=Gaussian, 3=ambient light on top].
    • doSpecRef (default value = 1) — Choose to include speculair reflectance: 1 = yes, 0 = no
    • fiber_normal (default value = 0 0 -1) — Normal direction of the fiber w.r.t. the sampleDefault = (0,0,-1).
    • gauss_std (default value = 0.5) — IF distribution==2, specifies the standard deviation of the Gaussian distribution as a fraction of the fiber’s radius. Default = 0.5
    • n_top (default value = 1) — Refractive index of medium above top layer
    • sample_origin (default value = 0 0 0) — ‘Origin’ of the sample, w.r.t. which fiber is placed. Default = (0,0,0).
object __init__(tuple args, dict kwds) :
args: name, parent kwds: fiber_radius, n0, [child_predicate, allow_manager_change, distribution, sample_origin, fiber_normal, gauss_std, n_top, doSpecRef, StoreSpecRef, box_size, diffuse]
InitPhotonLaunch(name, parent, **kwargs)

InitPhotonPacket_Fiber

class mpacts.predicates.lighttransport_predicates.InitPhotonPacket_Fiber

Bases: mpacts.predicates.predicates.PredicateBase, mpacts.core.baseobject.BaseObject

When activated (e.g. by ‘Recycle’), initializes new photons in a disk with given radius and normal direction, with a distribution that is user-specified as [center:0, uniform on disk:1 and gaussian around center:2].
Has no default location.
  • Required keywords:
    • fiber_radius — Radius of the fiber.
  • Optional keywords:
    • allow_manager_change (default value = 0) — Boolean that decides whether or not a predicate will allow you to change the manager it is currently working on.This is a safety check, disable only when you know what you are doing.
    • child_predicate (default value = None) — child predicate
    • distribution (default value = 0) — Distribution of the new packets in the fiber.[0=Point, 1=Uniform, 2=Gaussian].
    • fiber_normal (default value = 0 0 -1) — Normal direction of the fiber w.r.t. the sampleDefault = (0,0,-1).
    • gauss_std (default value = 0.5) — IF distribution==2, specifies the standard deviation of the Gaussian distribution as a fraction of the fiber’s radius. Default = 0.5
    • sample_origin (default value = 0 0 0) — ‘Origin’ of the sample, w.r.t. which fiber is placed. Default = (0,0,0).
object __init__(tuple args, dict kwds) :
args: name, parent kwds: fiber_radius, [child_predicate, allow_manager_change, distribution, sample_origin, fiber_normal, gauss_std]
InitPhotonPacket_Fiber(name, parent, **kwargs)

StepComplete

class mpacts.predicates.lighttransport_predicates.StepComplete

Bases: mpacts.predicates.predicates.PredicateBase, mpacts.core.baseobject.BaseObject

Checks if all ‘substeps’ have been completed, so the MC step is completed.
Has no default location.
  • Optional keywords:
    • allow_manager_change (default value = 0) — Boolean that decides whether or not a predicate will allow you to change the manager it is currently working on.This is a safety check, disable only when you know what you are doing.
    • child_predicate (default value = None) — child predicate
object __init__(tuple args, dict kwds) :
args: name, parent kwds: [child_predicate, allow_manager_change]
StepComplete(name, parent, **kwargs)