xopto.dataset.render.mcml module

render_mcml(target_dir: Optional[str] = None, config: Optional[dict] = None, method: Optional[str] = None, cache: bool = False, cl_device: Optional[str] = None, cl_index: int = 0, cl_build_options: Optional[List[str]] = None, test: bool = False, verbose: bool = False)[source]

Render templates with the given configuration.

Parameters
  • target_dir (str) – Root directory for the dataset. The scripts will be rendered into “run” subdirectory and the dataset data will be saved into the data subdirectory. If None, the parent directory of this file will serve as the root directory.

  • config (dict) – Configuration / context to use when rendering the run scripts. If None, the default configuration will be used.

  • method (str) – Monte Carlo stepping method. One of “ar” “aw” or “mbl”.

  • cache (bool) – Enables fluence accumulator cache.

  • cl_device (str) – Default OpenCL device name or None. The value can be also set through the CL_DEVICE environment variable.

  • cl_index (int) – OpenCL device index (if multiple OpenCL devices of the same kind are installed). The value can be also set through the CL_INDEX environment variable.

  • cl_build_options (List[str]) – A list of OpenCL build options. See ClBuildOption for more details.

  • test (bool) – Do a test run. The run scripts will be rendered but not saved. This option will automatically enable the verbose mode.

  • verbose (bool) – Enables verbose reporting.