Manual#

All public konigcell subroutines are fully documented here, along with copy-pastable examples. The base functionality is summarised below. You can also use the Search bar in the top left to go directly to what you need.

We really appreciate all help with writing useful documentation; if you feel something can be improved, or would like to share some example code, by all means get in contact with us - or be a superhero and click Edit this page on the right and submit your changes to the GitHub repository directly!

Grids#

konigcell.Pixels(pixels_array, xlim, ylim, ...)

A class managing a 2D pixel space with physical dimensions, including tools for pixel manipulation and visualisation.

konigcell.Voxels(voxels_array, xlim, ylim, ...)

A class managing a 3D voxel space with physical dimensions, including tools for voxel manipulation and visualisation.

Projection Modes#

konigcell.RATIO - Weight cell values by the ratio of the intersected cell area / volume and the total circle area / sphere volume.

konigcell.INTERSECTION - Weight cell values by their intersected area / volume with the rasterized shape.

konigcell.PARTICLE - Weight cell values by the rasterized shape’s area / volume.

konigcell.ONE - Add factors to cells with no weighting.

2D Projections#

konigcell.dynamic2d(positions, mode[, ...])

Pixelize / rasterize a moving particle's trajectory onto a 2D pixel grid.

konigcell.static2d(positions, mode[, ...])

Pixelize / rasterize static particles' positions onto a 2D pixel grid.

konigcell.dynamic_prob2d(positions, values)

Compute the 2D probability distribution of a moving particle's specific quantity (e.g.

konigcell.static_prob2d(positions, values[, ...])

Compute the 2D probability distribution of static particles' specific quantities (e.g.

3D Projections#

konigcell.dynamic3d(positions, mode[, ...])

Voxelize / rasterize a moving particle's trajectory onto a 3D voxel grid.

konigcell.static3d(positions, mode[, ...])

Voxelize / rasterize static particles' positions onto a 3D voxel grid.

konigcell.dynamic_prob3d(positions, values)

Compute the 3D probability distribution of a moving particle's specific quantity (e.g.

konigcell.static_prob3d(positions, values[, ...])

Compute the 3D probability distribution of static particles' specific quantities (e.g.

Low Level Interface#

konigcell.kc2d

konigcell.kc3d

Plotting Utilities#

konigcell.create_fig([nrows, ncols, ...])

Return a plotly.graph_objs.Figure pre-formatted with equalised axes and white theming.

konigcell.format_fig(fig[, size, font, template])

Format a Plotly figure to a consistent theme for the Nature Computational Science journal.