Skip to content

C++/Python integrated workflows

SiRun is a minimalist interface designed to simplify developing and deploying computational algorithms as command-line apps, Python modules or web APIs.

The SiRun web interface is used to showcase exemplar workflows (TODO), including:

  • Image processing and segmentation
  • Flow simulation
  • Pore-network characterization and modeling
  • Statistical analysis of time-lapse 3D micro-CT data
  • 3D networks analytics
  • Integration with ML models

This platform is primarily hosted on a internal server, which includes a all its features. However, a minimal web-assembly build is available to the public. The tasks that can be automated by this platform are detailed on the SiRun web console. Console messages will indicate whether applications will run on the server or utilize browser’s web-assembly engine for light demos.

So far only libvoxel has been ported to Python.

The interface is same as that described below

TODO: Finish and release

Sirun uses a Python (file suffix .py) or a Json-like syntax (file suffix .cc) to manage data and pipelines.

Python syntax is managed using an embeded pocketpy, with several additional C++-based modules available.

Sirun modules can be imported as native Python Pip modules, though currently not available in PyPI repositories — you need to request for access to their private package repositories.

The input file/commands of Sirun are all in essence in the form of “keyword: data;” or “command-arguments” pairs, aiming for flexibility, simplicity and readability. The rules are as follows, in the order of priority:

  • Curly brackets { and } that are not preceded by a keyword can be used used to group long keyword data and for folding guide for text editors.
  • Data between single quotes, ', double quotes, ", pranthesis () and brackets [] are read as raw data, without further processing.
  • Multiple keyword:data pairs can be given in a single line provided that they are separated by a semicolon.
  • A semicolon or a new line character mark the end of each command / data block in single-line applications, such as Sindo itself and libvoxel/voxlib.
  • If a command/application allows multi-line keywords (e.g. pnflow/scalor codes) a semicolon, or an empty line (two consecutive new-line characters), or a colon after the next keyword is necessary to mark the end of a keyword data. In other words, the semicolon can be dropped if the next line is empty or if the next keyword is followed by a colon.
  • Anything following # and // are treated as comments, unless // is inside a block guarded by quotes or brackets.