diff --git a/README.md b/README.md index 232522d..be7c5ba 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,37 @@ additional documentation (the math behind it). This will be published in a sister repository in a later stage. If you have any question(s), please feel free to contact us: info@ascee.nl. + + +## Installation + +### Compilation + +#### Archlinux + +Compiling the code on Archlinux requires the following packages to be available: + +- openblas-lapack (AUR) +- Python 3.7 +- Numpy (Python-numpy) +- Cython + +#### Ubuntu / Linux Mint + +*Only tested with Linux Mint 18.04*, we require the following packages for +compilation: + +- build-essential +- cython +- python3-numpy +- libopenblas +- libclalsadrv-dev +- libopenblas-base +- libopenblas-dev + +### Dependencies + +#### Ubuntu / Linux Mint + +*Only tested with Linux Mint 18.04*. The following Dependencies are required +for Ubuntu: diff --git a/lasp/__init__.py b/lasp/__init__.py index e69de29..a921472 100644 --- a/lasp/__init__.py +++ b/lasp/__init__.py @@ -0,0 +1,8 @@ +from .lasp_atomic import * +from .lasp_avstream import * +from .lasp_common import * +from .lasp_measurement import * +from .lasp_octavefilter import * +from .lasp_slm import * +from .lasp_weighcal import * +from .wrappers import * diff --git a/lasp/lasp_common.py b/lasp/lasp_common.py index 990ca91..d8f50b5 100644 --- a/lasp/lasp_common.py +++ b/lasp/lasp_common.py @@ -7,6 +7,7 @@ Common definitions used throughout the code. """ __all__ = ['P_REF', 'FreqWeighting', 'TimeWeighting', 'getTime', 'calfile', + 'getFreq', 'W_REF', 'U_REF', 'I_REF'] # Reference sound pressure level @@ -53,9 +54,11 @@ class TimeWeighting: none = (None, 'Raw (no time weighting)') uufast = (1e-4, '0.1 ms') ufast = (30e-3, '30 ms') - fast = (0.125, 'Fast') - slow = (1.0, 'Slow') - types = (none, uufast, ufast, fast, slow) + fast = (0.125, 'Fast (0.125 s)') + slow = (1.0, 'Slow (1.0 s)') + tens = (10, '10 s') + infinite = (np.Inf, 'Infinite') + types = (none, uufast, ufast, fast, slow, tens, infinite) default = 2 @staticmethod diff --git a/lasp/wrappers.pyx b/lasp/wrappers.pyx index c2cfea9..7fd4805 100644 --- a/lasp/wrappers.pyx +++ b/lasp/wrappers.pyx @@ -1,8 +1,10 @@ """ -This file contains the Cython wrapper functions to +This file contains the Cython wrapper functions to C implementations. """ include "config.pxi" +__all__ = ['AvPowerSpectra'] + setTracerLevel(15) cdef extern from "cblas.h": int openblas_get_num_threads() diff --git a/scripts/lasp_calibrate.py b/scripts/lasp_calibrate.py index 7dbc06b..8f2b094 100755 --- a/scripts/lasp_calibrate.py +++ b/scripts/lasp_calibrate.py @@ -5,7 +5,7 @@ Created on Tue Aug 14 12:49:27 2018 @author: J.A. de Jong - ASCEE -Description: calibrate device using measurement +Description: apply calibration to measurement files. """ import numpy as np @@ -28,7 +28,8 @@ parser.add_argument('--gain-setting', '-g', parser.add_argument( 'fn', help='File name of calibration measurement', type=str) -parser.add_argument('--channel', help='Channel of the device to calibrate, default = 0', +parser.add_argument('--channel', help='Channel of the device to calibrate, ' + + 'default = 0', type=int, default=0) parser.add_argument('--spl', '-s', help='Applied sound pressure level to the'