A library to comunicate with the database Belen to search, download and compute beam stored in it
It is a library used to connect to a specific database, download data stored in it and make some simple calculation. The data are beam patterns obtained from measurements in two anechoic chambers saved on the database as HDF5 files.
The package is divided in two distinct modules called connection and computation that have different tasks.
This module is a class with useful function to establish a connection with the chosen database. The database is structered in a way that each beam identifier (the data user is looking for) is linked to a measurements page with information about the measure and the links to projects and instruments pages. With connection is possible to find the desired beam identifier through a search in one of those pages and finally download the data that is converted from a .h5 file to a Python dict variable preserving the same structure
This module has some function used to perform simple (but useful) calculation from the data previously obtained from connection. Till now this module has only two functions, one to compute mean and variance of the data and the other to perform normalization and centering of beam patterns, but more will be added in the future.
Example of usage
After being installed here is a classic way to use this package.
>>> c = share_belen.connection.Connection(Host) >>> i_m = c.search_meas_by_instruments('Instrument To Search') >>> #More than one measurement can be linked at the same instrument >>> i_b = c.search_beam_by_meas(i_1) >>> #More than one beam can be linked at the same measurement >>> b = c.get_beam_in_dict_by_id(i_b) >>> b_c = share_belen.computation.make_beam_meanvar(b) >>> b_c_2 = share_belen.computation.center_norm_beam(b_c)
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size AnechoDB_Access-1.01.zip (9.2 kB)||File type Source||Python version None||Upload date||Hashes View|