Gaussian Decompostion of a LiDAR Waveform

# gdecomp: python binding of C++ signal gaussian decomposition.

This package aims at decomposing a signal (1D numpy array) into a sum of gaussian, typically used in full waveform lidar analysis. It is used in particular to process lidar simulations produced with pytools4dart. This code is inspired from C++ code developped by DART team (Jianbo Qi, Tiangang Yin), for DART radiative transfer simulator.

• Creation date: 2019-05-24
• Author: Florian de Boissieu

# Requirements

Cython and Numpy are necessary and can be installed with (they should be installed at package installation otherwise):

pip install cython numpy


# Install

Package gdecomp can be installed with:

pip install gdecomp


# Example

import gdecomp
import numpy as np
import matplotlib.pyplot as plt

x=np.arange(100)
gaus=np.array([[130, 20, 5],
[50, 50, 10],
[10, 70, 5]])

y=np.zeros(x.shape)
for i in range(gaus.shape[0]):
y += gaus[i,0] / (np.sqrt(2 * np.pi)*gaus[i,2]) * np.exp(-(x - gaus[i,1])**2 / (2 * gaus[i,2]**2))

out = gdecomp.GaussianDecomposition(y)
out = np.reshape(out, (-1, 3))

fit = np.zeros(y.size)
for i in range(out.shape[0]):
fit += out[i,0] / (np.sqrt(2 * np.pi)*out[i,2]) * np.exp(-(x - out[i,1])**2 / (2 * out[i,2]**2))

line1 = plt.plot(x, y, color='k', label='waveform')
line2 = plt.plot(x, fit, color='r', linestyle='--', label='fit')
plt.legend(loc='upper right')


# Aknowledgements

This package includes cmpfit source code of CMPFIT library, software developed by the University of Chicago, as Operator of Argonne Nationa Laboratory. See src/mpfit/DISCLAIMER for copyright details of that code.

## Project details

### Source Distribution

gdecomp-1.0.5.tar.gz (26.0 kB view hashes)

Uploaded Source

### Built Distributions

gdecomp-1.0.5-cp38-cp38-win_amd64.whl (55.2 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

gdecomp-1.0.5-cp38-cp38-win32.whl (47.7 kB view hashes)

Uploaded CPython 3.8 Windows x86

gdecomp-1.0.5-cp38-cp38-manylinux2010_x86_64.whl (279.0 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

gdecomp-1.0.5-cp38-cp38-manylinux2010_i686.whl (206.4 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

gdecomp-1.0.5-cp37-cp37m-win_amd64.whl (54.6 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

gdecomp-1.0.5-cp37-cp37m-win32.whl (47.1 kB view hashes)

Uploaded CPython 3.7m Windows x86

gdecomp-1.0.5-cp37-cp37m-manylinux2010_x86_64.whl (276.1 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

gdecomp-1.0.5-cp37-cp37m-manylinux2010_i686.whl (204.4 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

gdecomp-1.0.5-cp36-cp36m-win_amd64.whl (54.3 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

gdecomp-1.0.5-cp36-cp36m-win32.whl (46.9 kB view hashes)

Uploaded CPython 3.6m Windows x86

gdecomp-1.0.5-cp36-cp36m-manylinux2010_x86_64.whl (274.5 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

gdecomp-1.0.5-cp36-cp36m-manylinux2010_i686.whl (203.0 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686

gdecomp-1.0.5-cp35-cp35m-win_amd64.whl (54.3 kB view hashes)

Uploaded CPython 3.5m Windows x86-64

gdecomp-1.0.5-cp35-cp35m-win32.whl (46.8 kB view hashes)

Uploaded CPython 3.5m Windows x86

gdecomp-1.0.5-cp35-cp35m-manylinux2010_x86_64.whl (273.7 kB view hashes)

Uploaded CPython 3.5m manylinux: glibc 2.12+ x86-64

gdecomp-1.0.5-cp35-cp35m-manylinux2010_i686.whl (202.2 kB view hashes)

Uploaded CPython 3.5m manylinux: glibc 2.12+ i686