xopto.mcml.test.validate module

class DoubleLayerUniformFiberRadial(usepflut: bool = False, verbose: bool = False, **kwargs)[source]

Bases: xopto.mcbase.mctest.McTest

Test of the Monte Carlo simulator for a double layer sample and a normally incident optical fiber source. The reflectance is computed for a wide range of optical properties and compared to reference data. A Cartesian detector is used to collect the reflectance. The comparison to reference data is made for linearly placed fibers.

Parameters
  • usepflut (bool) – Run the simulator with lookup table-based sampling of the scattering phase function.

  • verbose (bool) – Turn on/off verbose output.

  • kwargs (dict) – Parameters passed to the Monte Carlo simulator constructor xopto.mcml.mc.Mc().

passed()bool[source]

Returns True if the simulator passed the test, else False.

run(nphotons: int = 10000000.0, **kwargs)float[source]

Run the test.

Parameters
  • nphotons (int) – The number of photon packets to use for each simulation run.

  • kwargs (dict) – Parameters passed to the Monte carlo run method xopto.mcml.mc.Mc.run().

Returns

tmc – Time (s) consumed by the simulator core.

Return type

float

visualize()[source]

Visualize the results of the test.

class SingleLayerGkLutSixLinearProbe(usepflut: bool = False, verbose: bool = False, **kwargs)[source]

Bases: xopto.mcbase.mctest.McTest

Test of the Monte Carlo simulator for a singel layer sample, 3D GK gamma lookup table and a normally incident six-linear optical fiber probe.

Parameters
  • usepflut (bool) – Run the simulator with lookup table-based sampling of the scattering phase function.

  • verbose (bool) – Turn on/off verbose output.

  • kwargs (dict) – Parameters passed to the Monte Carlo simulator constructor xopto.mcml.mc.Mc().

passed()bool[source]

‘ Returns True if the simulator passed the test, else False.

run(nphotons: int = 10000000.0, **kwargs)float[source]

Run the test.

Parameters
  • nphotons (int) – The number of photon packets to use for each simulation run.

  • kwargs (dict) – Parameters passed to the Monte carlo run method xopto.mcml.mc.Mc.run().

Returns

tmc – Time (s) consumed by the simulator core.

Return type

float

visualize()[source]

Visualize the results of the test.

class SingleLayerLineSourceRadialProfile(usepflut: bool = False, verbose: bool = False, **kwargs)[source]

Bases: xopto.mcbase.mctest.McTest

Test of the Monte Carlo simulator for a singel layer sample and a normally incident thin line source. The radial reflectance distribution is computed for a single set of optical properties and compared to the reference data.

Parameters
  • usepflut (bool) – Run the simulator with lookup table-based sampling of the scattering phase function.

  • verbose (bool) – Turn on/off verbose output.

  • kwargs (dict) – Parameters passed to the Monte Carlo simulator constructor xopto.mcml.mc.Mc().

passed()bool[source]

Returns True if the simulator passed the test, else False.

run(nphotons: int = 10000000.0, **kwargs)float[source]

Run the test.

Parameters
  • nphotons (int) – The number of photon packets to use for each simulation run.

  • kwargs (dict) – Parameters passed to the Monte carlo run method xopto.mcml.mc.Mc.run().

Returns

tmc – Time (s) consumed by the simulator core.

Return type

float

visualize()[source]

Visualize the results of the test.

class SingleLayerNineLinearProbe(usepflut: bool = False, verbose: bool = False, **kwargs)[source]

Bases: xopto.mcbase.mctest.McTest

Test of the Monte Carlo simulator for a singel layer sample and a normally incident nine-linear optical fiber probe.

Parameters
  • usepflut (bool) – Run the simulator with lookup table-based sampling of the scattering phase function.

  • verbose (bool) – Turn on/off verbose output.

  • kwargs (dict) – Parameters passed to the Monte Carlo simulator constructor xopto.mcml.mc.Mc().

passed()bool[source]

‘ Returns True if the simulator passed the test, else False.

run(nphotons: int = 10000000.0, **kwargs)float[source]

Run the test.

Parameters
  • nphotons (int) – The number of photon packets to use for each simulation run.

  • kwargs (dict) – Parameters passed to the Monte carlo run method xopto.mcml.mc.Mc.run().

Returns

tmc – Time (s) consumed by the simulator core.

Return type

float

visualize()[source]

Visualize the results of the test.

class SingleLayerSfdiIncidence30VariableNa(usepflut: bool = False, verbose: bool = False, **kwargs)[source]

Bases: xopto.mcbase.mctest.McTest

Test of the Monte Carlo simulator for a single layer sample and a 30 deg. incidence and variable detector NA. A detector.SymmetricX detector is used to collect the backscattered light.

Parameters
  • usepflut (bool) – Run the simulator with lookup table-based sampling of the scattering phase function.

  • verbose (bool) – Turn on/off verbose output.

  • kwargs (dict) – Parameters passed to the Monte Carlo simulator constructor xopto.mcml.mc.Mc().

passed()bool[source]

Returns True if the simulator passed the test, else False.

run(nphotons: int = 10000000.0, **kwargs)float[source]

Run the test.

Parameters
  • nphotons (int) – The number of photon packets to use for each simulation run.

  • kwargs (dict) – Parameters passed to the Monte carlo run method xopto.mcml.mc.Mc.run().

Returns

tmc – Time (s) consumed by the simulator core.

Return type

float

visualize()[source]
class SingleLayerSixLinearProbe(usepflut: bool = False, verbose: bool = False, **kwargs)[source]

Bases: xopto.mcbase.mctest.McTest

Test of the Monte Carlo simulator for a singel layer sample and a normally incident six-linear optical fiber probe.

Parameters
  • usepflut (bool) – Run the simulator with lookup table-based sampling of the scattering phase function.

  • verbose (bool) – Turn on/off verbose output.

  • kwargs (dict) – Parameters passed to the Monte Carlo simulator constructor xopto.mcml.mc.Mc().

passed()bool[source]

‘ Returns True if the simulator passed the test, else False.

run(nphotons: int = 10000000.0, **kwargs)float[source]

Run the test.

Parameters
  • nphotons (int) – The number of photon packets to use for each simulation run.

  • kwargs (dict) – Parameters passed to the Monte carlo run method xopto.mcml.mc.Mc.run().

Returns

tmc – Time (s) consumed by the simulator core.

Return type

float

visualize()[source]

Visualize the results of the test.

class SingleLayerUniformFiberCartesian(usepflut: bool = False, verbose: bool = False, **kwargs)[source]

Bases: xopto.mcbase.mctest.McTest

Test of the Monte Carlo simulator for a singel layer sample and a normally incident optical fiber source. The reflectance is computed for a wide range of optical properties and compared to reference data. A Cartesian detector is used to collect the reflectance. The comparison to reference data is made for linearly placed fibers.

Parameters
  • usepflut (bool) – Run the simulator with lookup table-based sampling of the scattering phase function.

  • verbose (bool) – Turn on/off verbose output.

  • kwargs (dict) – Parameters passed to the Monte Carlo simulator constructor xopto.mcml.mc.Mc().

passed()bool[source]

Returns True if the simulator passed the test, else False.

run(nphotons: int = 10000000.0, **kwargs)float[source]

Run the test.

Parameters
  • nphotons (int) – The number of photon packets to use for each simulation run.

  • kwargs (dict) – Parameters passed to the Monte carlo run method xopto.mcml.mc.Mc.run().

Returns

tmc – Time (s) consumed by the simulator core.

Return type

float

visualize()[source]

Visualize the results of the test.

class SingleLayerUniformFiberRadial(usepflut: bool = False, verbose: bool = False, **kwargs)[source]

Bases: xopto.mcbase.mctest.McTest

Test of the Monte Carlo simulator for a singel layer sample and a normally incident optical fiber source. The reflectance is computed for a wide range of optical properties and compared to reference data. A Radial detector is used to collect the reflectance. The comparison to reference data is made for linearly placed fibers.

Parameters
  • usepflut (bool) – Run the simulator with lookup table-based sampling of the scattering phase function.

  • verbose (bool) – Turn on/off verbose output.

  • kwargs (dict) – Parameters passed to the Monte Carlo simulator constructor xopto.mcml.mc.Mc().

passed()bool[source]

Returns True if the simulator passed the test, else False.

run(nphotons: int = 10000000.0, **kwargs)float[source]

Run the test.

Parameters
  • nphotons (int) – The number of photon packets to use for each simulation run.

  • kwargs (dict) – Parameters passed to the Monte carlo run method xopto.mcml.mc.Mc.run().

Returns

tmc – Time (s) consumed by the simulator core.

Return type

float

visualize()[source]

Visualize the results of the test.

class SingleLayerUniformFiberTrace(usepflut: bool = False, verbose: bool = False, **kwargs: dict)[source]

Bases: xopto.mcbase.mctest.McTest

Test of the Monte Carlo simulator for a single layer sample and trace analysis. The results of trace analysis are compared to the data collectred by the :py:class`mcdetector.Radial` detector.

Parameters
  • usepflut (bool) – Run the simulator with lookup table-based sampling of the scattering phase function.

  • verbose (bool) – Turn on/off verbose output.

  • kwargs (dict) – Parameters passed to the Monte Carlo simulator constructor xopto.mcml.mc.Mc().

passed()[source]

Returns True if the simulator passed the test, else False.

run(nphotons: int = 1000000.0, **kwargs)float[source]

Run the test.

Parameters
  • nphotons (int) – The number of photon packets to use for each simulation run.

  • kwargs (dict) – Parameters passed to the Monte carlo run method xopto.mcml.mc.Mc.run().

Returns

tmc – Time (s) consumed by the simulator core.

Return type

float

visualize()[source]
mc_options(cfg: dict)dict[source]

Extract options that can be passed to the Monte Carlo simulator constructor xopto.mcml.mc.Mc().

Parameters

cfg (dict) – Group of options in a dict.

Returns

options – The options from cfg that can be passed to the simulator constructor.

Return type

dict

run_options(cfg: dict)dict[source]

Extract options that can be passed to the Monte Carlo run method xopto.mcml.mc.Mc.run().

Parameters

cfg (dict) – Group of options in a dict.

Returns

options – The options from cfg that can be passed to the simulator run method.

Return type

dict