eradiate.kernel#

Go to Eradiate Kernel docs

eradiate.kernel.gridvolume#

Volume data file I/O helpers.

eradiate.kernel.gridvolume.read_binary_grid3d(filename)[source]#

Reads a volume data binary file.

Parameters

filename (path-like) – File name.

Returns

ndarray – Values.

eradiate.kernel.gridvolume.write_binary_grid3d(filename, values)[source]#

Write volume data to a binary file so that a gridvolume kernel plugin can be instantiated with that file.

Parameters
  • filename (path-like) – File name.

  • values (ndarray or DataArray) – Data array to output to the volume data file. This array must have 3 or 4 dimensions (x, y, z, spectrum). If the array is 3-dimensional, it will automatically be assumed to have only one spectral channel.

eradiate.kernel.logging#

Logging facilities.

eradiate.kernel.logging.install_logging(force=False)[source]#

Activate Python logging framework for Mitsuba.

Parameters

force (bool, optional) – If True, force-reactivate logging.

eradiate.kernel.transform#

Geometric transforms.

eradiate.kernel.transform.map_cube(xmin, xmax, ymin, ymax, zmin, zmax)[source]#

Map the cube \([-1, 1]^3\) to \([x_\mathrm{min}, x_\mathrm{max}] \times [y_\mathrm{min}, y_\mathrm{max}] \times [z_\mathrm{min}, z_\mathrm{max}]\).

Parameters
  • xmin (float) – Minimum X value.

  • xmax (float) – Maximum X value.

  • ymin (float) – Minimum Y value.

  • ymax (float) – Maximum Y value.

  • zmin (float) – Minimum Z value.

  • zmax (float) – Maximum Z value.

Returns

mitsuba.core.ScalarTransform4f – Computed transform matrix.

Warning

You must select a Mitsuba variant before calling this function.

eradiate.kernel.transform.map_unit_cube(xmin, xmax, ymin, ymax, zmin, zmax)[source]#

Map the unit cube \([0, 1]^3\) to \([x_\mathrm{min}, x_\mathrm{max}] \times [y_\mathrm{min}, y_\mathrm{max}] \times [z_\mathrm{min}, z_\mathrm{max}]\).

Parameters
  • xmin (float) – Minimum X value.

  • xmax (float) – Maximum X value.

  • ymin (float) – Minimum Y value.

  • ymax (float) – Maximum Y value.

  • zmin (float) – Minimum Z value.

  • zmax (float) – Maximum Z value.

Returns

mitsuba.core.ScalarTransform4f – Computed transform matrix.

Warning

You must select a Mitsuba variant before calling this function.