aves: Acquisition, Visualization and Exploration Software
This python module makes it easy to acquire data from a serial port, visualize it on real time and record it. It also provides a module for visualizing data previously aquired with this tool.
Installation
pip3 install aves
Quick start
- We will use an Arduino to send data through the serial port.
- We will use aves to acquire, represent and record the data.
Arduino code
Create a file with the contents from example/arduino.ino.
This sample code reads the analog ports from the arduino board and prints them on the serial port.
Take note of:
- The SAMPLE_TIME (in ms):
100 - The Serial port speed (in bauds):
9600 - The Analog Read Resolution (in bits):
10 - The input range of the analog ports (in volts):
(check your board, usually 5V or 3.3V)
Aves configuration
Aves is configured using a yaml file. Please take the example file from
example/config.yaml.
The yaml file has four sections:
version: Just a value, must be 2.input: Defines the aves input sources.gui: Controls the real time plotting optionsoutput: Defines the columns with sensor data that will be saved in a text file.
The input section
Aves uses two sources of information, the arduino and the computer clock.
For the arduino input, we have multiple parameters:
baudrate: The baudrate specified in the arduino code.timeout: The seconds the python code will wait for data until it believes the serial connection has been dropped.columns: Aves must know what is the arduino printing on the serial port.columnsis a list with as many elements as columns. Each element is defined bynamewhich gives a name to the column andconversion_factorthat is used to convert the number printed by the arduino to a magnitude meaninful for us. For instance, the conversion_factor is used in the example to convert the time printed by the arduino from milliseconds to seconds (0.001), and the sensor reads (in the range 0-1023) to Volts (in the range 0-5V): (5V/1023 = 0.004887586). The columns should be given in the order that they are printed by the arduino.
The computer clock does not have an entry, as it has no options. However, we should remember that besides the columns defined
in the arduino section, we also have the time_computer column, useful to synchronize our experiment with other information.
The gui section
The gui defines the visualization options, including:
- The name of the column used in the
xaxis (x_column). It usually is the time given by the Arduino. - Whether or not the zoom for all the subplots should be shared. It is often convenient to have it shared (
zoom_all_together). - The
axes: The subplots available in the window. Imagine the subplots layed out in a grid. The first subplot (top-left) would be inrow: 0,col: 0. The subplot below the first would appear inrow: 1,col: 0, etc. Subplots may span several rows or columns, to make them larger, with therowspanandcolspanoptions, by default both set to1. Each subplot should plot at least one column from the input, although more than one column can be plotted. The column names to be plotted for each subplot are given incolumns. Additional plotting options (limits, labels) can be given inoptions.
Besides, there is the name of the window window_title and the refresh_time_ms that controls how often the GUI is refreshed.
The output section
Controls the columns that will be printed to the text file. Note how we have in the example both the computer time and the arduino time printed.
Run it:
python3 -m aves.realtime --port *Serial port where your arduino is connected* --outfile "test.txt"
Check python3 -m aves.realtime --help for all other command line options, for instance:
--no-saveDo not save the captured data to a file--outfile test.txtSave the capture data totest.txt--tmeas 600Capture data for 600 seconds maximum (default: unlimited)--port COM3Use theCOM3serial port--plot_every_n_samples 10Wait for at least 10 samples to refresh the GUI--plot_win_size 200Keep up to 200 samples in the plot (use 0 for unlimited)--config another.yamlUseanother.yamlas config file.
Explore the acquired data:
python3 -m aves.explorer --filename "test.txt"
Known works using aves
- The prototype for fire detection developed at IBEC under the SafeSens project
Metadata
Release files for aves 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aves-3.0.1.tar.gz | 12.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aves-3.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.2 kB
Release files / aves-3.0.1.tar.gz
| Download URL | aves-3.0.1.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9869b344acf81169fc968f47d1b044a3baeb2ad41c20fff021a0c79192eba54a
|
|
BLAKE2b-256 checksum How to use checksums |
915cef7d1f2b37ca8b10ee824c6899ebc8b79adb4114558bf6a989b3b93c7c27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
|
Release files / aves-3.0.1-py3-none-any.whl
| Download URL | aves-3.0.1-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6ff6465e1fb8d8b3d591a83eade5183383a9d787f1e0dd9273259fc6f7b4906
|
|
BLAKE2b-256 checksum How to use checksums |
7157e366a4ac790342f2329bf3f01bf6dadeaa484c3d14af1a95227a3fc3f6d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
|
Security for aves 3.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.