Skip to main content

Wind Lidar Data Converter.

Project description

PyPI version

Lidaco

Lidaco (Wind Lidar Data Converter) is a library and executable that enables a modular writing of data converters.

Following the configurations that are specified by the user on a config.yml(s), a Reader module is selected to import the data from input files. Similarly, a Writer is also selected to write the output file(s).

Lidaco works on datasets that can be described using the unidata Common Data Model. It can be used to process single files or entire folders.

Available Readers
* AQ500
* Galion
* WLS70
* Windcubev1
* Windcubev2
* Windscanner
* ZephIR300
* Triton
Available Writers
* MetadataCard
* NcML
* NetCDF4

Getting started

Install
pip install lidaco
Run in the command line (shell)
lidaco --config-file=samples/Windscanner/config.yaml
Use as a library
from lidaco.core.Builder import Builder

builder = Builder(config_file = 'path/to/config.yaml')
builder.build()

Converting data

Writing conversion files

Each conversion requires a configuration file written in YAML. This file contains four (optional) main groups of configurations:

Parameters

This section allows you to specify the parameters for the converter itself, the selected reader and or writer. The converter parameters are:

parameters:
  input: 
    path: ./path/to/input/folder/
    format: Windscanner                 # The name should match 
  output: 
    path: ./path/to/output/folder       # optional, defaults to ./output/
    format: NetCDF4
  
  # Optional, and specifies the number of input files to be concatenated per output file.
  # If not specified defaults to 1 (1 output per input file). The last output will contain <= output_block_size input files.
  # If the parameter is specified with None (the same as without any value), all input files will be concatenated into a single output file.
  output_block_size: 3

Some of these parameters can be overridden using the command arguments, run lidaco --help to know them.

When specifying relative paths, the configuration file location wherein these are specified, or the current directory when specifying them as command arguments, is the one used to resolve its absolute value.

Additional parameters might be necessary depending on the specific reader/writer in use. Read the respective module documentation available, or try to take a look at its source code.

Attributes

This section specify the global attributes that will be added to the dataset. You can add all attributes you desire.

attributes:
  # e.g.,
  lidar_technology: 'pulsed'
  lidar_scanning_type: 'vertical profiling'
  data_processing_history: 'data taken from .scn files generated by ...'
Variables

This section is similar to Attributes but instead of reading being used to specify Attributes, it is used to specify variables.

variables:   
  # e.g.,
  pitch:
    data_type: 'f4'
    units: 'degrees'
    long_name: 'lidar_pitch_angle'
    comment: ''
    accuracy: ''
    accuracy_info: 'No information on pitch accuracy available.'
    value: 0
Imports

Lidaco configuration system is built to motivate the configurations reusability, so each config file can import others. With this mechanism you can to split your configurations into devices, scenarios, campaigns and so on. In case of multiple definitions of an attribute or variable, the definitions in the file prevail over the others that are imported.

imports: # read in order
  - ./general/NEWA_Kassel_general_dataset.yaml
  - ./instruments/Windcubev2_general_instrument_description.yaml
  - ./processing/NEWA_Kassel_data_processing_history.yaml

For more examples on how to setup your config files, take a look at the available Samples.


Contributing

If you would like to add, or see being added, some change to the converter you can:

To submit a new Reader/Writer
  • Create a python class at lidaco.readers or lidaco.writers, if you are writing a reader or writer respectively.
  • The file and class should have the same name, that will be used in the config files.
  • It should extend core.reader or core.writer.

Take a look at the existing readers and writers.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lidaco-0.0.28.tar.gz (22.9 kB view details)

Uploaded Source

File details

Details for the file lidaco-0.0.28.tar.gz.

File metadata

  • Download URL: lidaco-0.0.28.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.6

File hashes

Hashes for lidaco-0.0.28.tar.gz
Algorithm Hash digest
SHA256 200ce358302e93c953428ea3d25161eb1ef5d4cef18c26ab732ebdf8fe868cf6
MD5 597ac0acca4ad1a2c773a2c1cb3abfd0
BLAKE2b-256 156491acfc0b27634cb94cd1963ac3ea5e44ed784597cb8c877b85bcd46b9f53

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page