Utility package for extracting, reading and saving metadata from HDF5 Phenomobile V2 acquisition file
Project description
H5Info Package
This Python package contains the necessary tools to extract data and metadata from HDF5 files generated by Phenomobile acquisition in the context of the Phenome project by INRA, France.
The API of the H5Info package exposes 3 methods:
load_data()
: to extract data from a HDF5 file and store it into a H5Info structuresave_metadata()
: to save a H5Info metadata structure into a JSON fileload_metadata()
: to load a H5Info metadata structure from a JSON file
If an error occurs because of invalid data, a DataError
exception is raised. A good practice consists in catching this error in a separate except
block than the other exceptions.
Please refer to the main.py
script for an example about how to use these three methods.
Install H5Info module
The H5Info module is deployed on PyPi (Python Package Index) under the name h5-info-pkg-inra-phenome.
To install the H5Info module on your local environment, just run the following command:
pip install h5-info-pkg-inra-phenome
H5Info Structure Example
h5_info = H5Info()
Session
h5_info.session.date = 2020-02-03_09:45:23
h5_info.session.experiment_id = "2019_SunRise"
h5_info.session.experiment_uri = "http://www.phenome-fppn.fr/diaphen/2019/v1901"
h5_info.session.local_infra = "Diaphen"
h5_info.session.national_infra = "PHENOME"
Plot
h5_info.plot.id = "20LP4_129_8_1039"
h5_info.plot.uri = "http://www.phenome-fppn.fr/diaphen/2018/v1801"
h5_info.plot.coordinates = [[1.5015271931087, 43.532682695713], [1.5015062032854, 43.532676540606], [1.5014877113578, 43.532709920144], [1.5015087011914, 43.532716075254]]
h5_info.plot.orientation = 158.04785481961858
Vector
h5_info.vector.id = "Phenomobile V2"
h5_info.vector.uri = "http://www.phenome-fppn.fr/diaphen/2018/v1801"
h5_info.vector.serial_nb = "PHENOMOBILE_V2_01"
Sensors
for sensor in h5_info.sensors:
sensor.id = "4"
sensor.type = "camera"
sensor.description = "camera_1"
sensor.manufacturer = "Baumer"
sensor.model = "VLG 40C"
sensor.serial_nb = "00_06_be_01_62_f0"
sensor.uri = "http://www.phenome-fppn.fr/agrophen/2019/s19003"
Image
for image in sensor:
image.name = "camera_1_1"
image.date = 2019-06-04_12:11:52.316072
Camera, Multispectral and Lidar images have also their own specific attributes.
Others fields
The H5Info structure contains other fields not detailed here, such as the vector position
, each sensor positions
and static transforms
factors. In addition, a geolocalisation file containing positions of the head is saved in a separate file named geo.csv
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for h5-info-pkg-inra-phenome-1.1.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c89612a73e5c77e900cb2fede010b14e8fd58e32726fbbf49c442f986d82d450 |
|
MD5 | bcd5078d624c4f85142a5578b7de7563 |
|
BLAKE2b-256 | 0bed63384442949464db6b748c3f28a48c8701f377dfe087d37e56827e24cf13 |
Hashes for h5_info_pkg_inra_phenome-1.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a53a3b7b2c2c116dd1c82fb0dc297b7a04904c0b6654cd5fe2e8760d5e720457 |
|
MD5 | d56319a3699b00b9f6ed3f5096b90513 |
|
BLAKE2b-256 | 9ad78a5ca71bcdce15b2670438e8ea15a49960da94108fba242087d4ed1064c3 |