Qlunc
is a python-based, open, freely available software that aims to quantify errors when measuring with a lidar device. The code has an objected-oriented structure; by using python objects and simulating real lidar components the code puts all together in modules to eventually build up a lidar digital twin. The code is meant to be as modular as possible and offers the possibility of creating different lidar objects on parallel (see Tutorial2.ipynb), with different components at the same time. This allows to easily combine different modules with different characteristics simulating different lidar devices.
Currently, the code can calculate uncertainties coming from photonics, including photodetector (with or without trans-impedance amplifier) and optical amplifier uncertainties, as well as optics module uncertainty including scanner pointing accuracy and optical circulator uncertainties. For each module the Guide to the Expression of Uncertainty in Measurement (GUM) is applied to calculate uncertainty expansion, taking into account that components are considered uncorrelated.
The user creates the different lidar components by instantiating a python class
, including its functional parameters and defining the function that is used to obtain the specific component uncertainty. Then, each module (also python objects) is "filled" with the corresponding components and their uncertainties are computed following uncertainty expansion method according to the GUM model. Once each component is 'ensembled' building up the different modules, the lidar object is created and the modules included. As a result, the desired lidar digital twin is created, the uncertainty of which is computed again by following GUM suggestions about uncertainty expansion.
The user creates also atmospheric scenarios to account for the different atmospheric conditions the lidar has to deal with. Atmospheric inputs, basically temperature and humidity, either single values or time series coming from peripherals are both accepted.
The next step is to ask for the uncertainty we are interested in, either coming from a component, module or lidar object. Indeed, the flexibility of the code allows the user not just to assess global lidar uncertainty, but also to query uncertainties coming from specific modules or even single components.
- Can draw photodetector uncertainties comparison including shot noise, thermal noise, dark current noise and, if needed, trans-impedance amplifier noise.
- Scanning points and their uncertainty in meters (VAD and Scanning lidar).
-
Having Anaconda installed is a prerequisite if we want to work in a different environment than
base
, and it is recommended. Then, based on the requirements added to theenvironment.yaml
file on the repository, where are included the name of the environment and the tools/packages we want to install, we build the new environment. -
In the Anaconda prompt, go to the directory where you have clone/download
Qlunc
and type:
conda env create -f environment.yml
conda activate <envname>
-
Your environment is ready to rumble. You have now a new environment, called
Qlunc_Env
by default, with all the packages needed to runQlunc
. -
In case you don't want to create a new environment, just install the requirements listed in the Requirements section below.
Download or clone the repository to a local directory
By downloading or cloning the repository you will get several folders within which Qlunc
is organized. The most importants to know are:
This is the core of Qlunc
. Here the user creates the classes describing the components, modules and general inputs of the lidar device and instantiate the classes.
Template_yaml_inputs_file.yml
andQlunc_inputs.yml
. The former is a yaml template where user introduces the lidar components values, modules and general lidar features as well as atmospheric scenarios; the latter can be taken as an example showing how to fill in the template.Qlunc_Classes.py
contains the code which creates all the lidar digital twins. Each lidar module/component is assigned to a pythonclass
.Qlunc_Instantiate.py
instantiate the lidar classes taking the values fromQlunc_inputs.yml
.
- Contains the functions that compute the uncertainties coming from different devices, calculting also the uncertainty propagation corresponding to the different modules and lidar uncertainty as well. Users can define their own functions to calculate specific module uncertainties, and combined/expanded uncertainties as well.
- Contains scripts meant to do different tasks. Importing packages and some stand alone funtions which don´t interface directly with
Qlunc
but are necessary to compute calculations. Also contains aQlunc_Plotting.py
script to automate plots andScanning_patterns.py
to introduce pre-defined scanning patterns.
- A working example is provided to show how the process looks like. In this test case, a lidar is built up with its modules and components, puting all together to set up a lidar device. User can find more information on how to run this test file in the
readme.md
file dropped in this folder.
- Containing 2 Jupyter Notebook-based tutorials;
Tutorial1.ipynb
andTutorial2.ipynb
with their corresponding yaml files. The tutorials are also available through the Binder service to ease accessibility and reproducibility. Users can find more information about these tutorials in the correspondingreadme.md
file dropped in this folder.
The following python libraries and tools should be installed beforehand and are included in the environment.yml
file:
- matplotlib==3.2.1
- numpy==1.18.5
- pandas==1.2.1
- pyyaml==5.4.1
- scipy==1.6.0
- sympy==1.7.1
- xarray==0.15.1
- python==2.7
- spyder==4.2.1
- notebook
- jupyterlab
Qlunc
is licensed under SD 3-Clause License
University of Stuttgart - Stuttgart Wind Energy
email: costa@ifb.uni-stuttgart.de