A number of concepts and components of Scipp can and should be customized to the needs of higher-level libraries or to a particular use case. At this point we support compile-time customization of:
The maximum number of dimensions supported by operations with
Variableis configured using the
New or custom
dtypethat can be stored as elements in a
Variableand used with the
Source code for Scipp is hosted in a github repository here.
To add a new
INSTANTIATE_VARIABLE, available when including
Note that this
tcc file should never be included in a header.
The instantiation macro call must be placed in the
The first marco argument is the display name of the new
dtype, and the identifier used for Python bindings.
The second macro argument is the C++ type.
To support formatting of variables with the new
dtype it should be registered in
variable_instantiate_py_object.cpp can be used as a reference.
In addition to these steps, it is currently required to manually add Python bindings in several places. TODO: Improve or document this process.