General
General Usage
fluxEngine is distributed as as single Python module, and may be imported via:
import fluxEngine.v5 as fluxEngine
Error Handling
Errors are reported via the RuntimeError exception class at the
moment.
Naming Conventions
fluxEngine attempts to follow the naming conventions of most python
libraries. Type names are in upper camel case, e.g. Handle,
ProcessingResult, ResourcePool, etc. Variable, method and
parameter names are in lower snake case, e.g.
create_from_license_file, white_reference, etc.
Initializing the Library
To initialize the library a license file is required. The user must read that license file into memory and supply fluxEngine with it.
The following code demonstrates how to properly initialize fluxLicense:
handle = fluxEngine.Handle.create_from_license_file("fluxEngine.lic")
Licenses tied to camera serial numbers
If a license is tied to a camera serial number, certain operations will fail unless the camera is currently connected. These operations include (but are not limited to):
Loading a model
Creating a processing context (even for offline processing)
Processing data with an already existing processing context
Loading a HSI cube from disk
For this reason, even if only offline data is to be processed, if a license file is tied to a camera serial number, the user must always first connect to that camera before performing any of these operations. The camera must stay connected while the user wants to perform any of these operations.
It is still possible to save HSI cubes to disk even if no camera is connected. This is to ensure that the camera fails unexpectedly during operation (because e.g. somebody unplugged it) to give the user a chance to save the data they curreently have in memory.
If the license is tied to a dongle or a mainboard serial, this does not apply, and these operations can be performed at any time after a handle has been created. (If a dongle is phyiscally removed after creating a handle, the same restrictions apply though.)