Skip to main content

Wavelet-based Eddy Covariance Written by pedrohenriquecoimbra

Project description

WaveletEC Module

WaveletEC is a Python module designed for processing and analyzing Eddy Covariance data using wavelet transforms. This module provides functionalities to handle EddyPro setup files, perform wavelet analysis, and integrate results.

DOI

DOI

Citation

Pedro H H Coimbra, Benjamin Loubet, Olivier Laurent, Matthias Mauder, Bernard Heinesch, Jonathan Bitton, Nicolas Delpierre, Daniel Berveiller, Jérémie Depuydt, Pauline Buysse. Evaluation of a novel approach to partitioning respiration and photosynthesis using eddy covariance, wavelets and conditional sampling. https://doi.org/10.1016/j.agrformet.2025.110684

* corresponding author: pedro-henrique.herig-coimbra@inrae.fr

Installation

From pip

To install the WaveletEC module, use pip:

Recommended step (optional):

conda create -n wavec
conda activate wavec

Install library:

pip install waveletec

From git

To install the WaveletEC module, clone the repository and install the required dependencies:

git clone https://github.com/pedrohenriquecoimbra/wavelet-ec
cd waveletec

Then one of the follwoing options:

  • pip install -r requirements.txt
  • conda create -n wavec --file requirements.txt
  • conda create -f environment.yml

Usage

(Recommended) Using EddyPro

  1. Make sure EddyPro® is installed.
  2. Run EddyPro, saving level 6 raw data.
    • go to Advanced Settings (top menu) > Output Files (left menu) > Processed raw data (bottom);
    • select Time series on "level 6 (after time lag compensation)";
    • select all variables;
    • proceed as usual running on "Advanced Mode".
  3. Run waveletec:
    This requires pip install waveletec
    import waveletec
    waveletec.run_from_eddypro("PATH/TO/EDDYPRO/SETUP", ...):
    
    Or directly in the command line:
    cd PATH/TO/WAVELETEC/LIBRARY
    python -m waveletec.handler --help
    python -m waveletec.handler [-args...]
    

Running waveletec

This requires pip install waveletec.

import waveletec

Then

waveletec.process(...)

or directly run from a DataFrame or dictionary:

data = ...
waveletec.main(data, ...)

Saving Results

If you're using waveletec.process, just pass the output_folderpath parameter like this: waveletec.process(..., output_folderpath='PATH/TO/OUTPUT/FOLDER'). This will create a new subfolder called 'wavelet_full_cospectra' for you, and you'll find the sum of all your files neatly stored in the output_folderpath you specified.

Prefer using waveletec.main? No problem! Just pass the output_kwargs parameter like this: waveletec.main(data, ..., output_kwargs={'output_path': 'PATH/TO/OUTPUT/FOLDER'}).

Output Format

The output file for the wavelet-based (co)spectra analysis is structured as follows:

1   wavelet_based_(co)spectra
2   --------------------------------------------------------------
3   TIMESTAMP_START = 2022-05-13 00:00:00
4   TIMESTAMP_END = 2022-05-13 00:30:00
5   N: 133
6   TIME_BUFFER [min] = nan
7   frequency [Hz]
8   y-axis -> nan
9   mother_wavelet -> dwt
10  acquisition_frequency [Hz] = 20.0
11  averaging_interval [Min] = 30min
12  natural_frequency,variable,value
13  3.814697265625e-05,co2,417.0002460141172
.   ...,...,...
.   5.0,co2,1.708199383374261e-05
.   10.0,co2,1.7947312058017124e-07
.   ...,...,...

Explanation of Fields:

  • wavelet_based_(co)spectra: Indicates that the data pertains to wavelet-based (co)spectra analysis.

  • TIMESTAMP_START and TIMESTAMP_END: These fields specify the start and end times of the data collection period.

  • N: Represents the number of data points or samples included in the analysis.

  • TIME_BUFFER [min]: Indicates the time buffer in minutes. A value of 0 means no buffer was applied.

  • frequency [Hz]: Specifies the frequency of the data is in Hertz.

  • y-axis_->_wavelet_coefficient_*_: Indicates that the y-axis represents the wavelet coefficients.

  • mother_wavelet -> dwt: Specifies the type of mother wavelet used in the analysis, in this case, dwt (Discrete Wavelet Transform).

  • acquisition_frequency [Hz]: The frequency at which data was acquired, given in Hertz.

  • averaging_interval [Min]: The interval over which the data was averaged, specified in minutes.

  • natural_frequency,variable,value: This line contains the actual data points:

    • natural_frequency: The frequency at which the data point was recorded.
    • variable: The variable being measured, such as co2.
    • value: The value of the variable at the specified natural frequency.

Example

For an example follow the launcher_sample.ipynb file in sample.

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

waveletec-0.3.0.1.1.tar.gz (46.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

waveletec-0.3.0.1.1-py3-none-any.whl (66.4 kB view details)

Uploaded Python 3

File details

Details for the file waveletec-0.3.0.1.1.tar.gz.

File metadata

  • Download URL: waveletec-0.3.0.1.1.tar.gz
  • Upload date:
  • Size: 46.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.12

File hashes

Hashes for waveletec-0.3.0.1.1.tar.gz
Algorithm Hash digest
SHA256 0dcbf701371014f6b6a7d27636e769b5bb0797c5f4d9a6389b66ea4c044304ff
MD5 b0c483e6e3a8de9887c06d08de71bd78
BLAKE2b-256 4b54399ac59644fea11afb2007accbc71e8aec3257a6ea3e28dc063bd84b56eb

See more details on using hashes here.

File details

Details for the file waveletec-0.3.0.1.1-py3-none-any.whl.

File metadata

  • Download URL: waveletec-0.3.0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 66.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.12

File hashes

Hashes for waveletec-0.3.0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4485be461a12f95fa9c6ff04763be33ae0a111b860059058bda34fef3c080ee5
MD5 bcf9447ffad6bb63227121767635f7cd
BLAKE2b-256 c9d1d6c5c060cb6e14bfcfb3e4623bcf00917c2c7c810fdf496a276fbd595546

See more details on using hashes here.

Supported by

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