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.0.2.tar.gz (44.2 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.0.2-py3-none-any.whl (52.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: waveletec-0.3.0.0.2.tar.gz
  • Upload date:
  • Size: 44.2 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.0.2.tar.gz
Algorithm Hash digest
SHA256 28b40dada30eddfeeafa92085c7c11dd032a5c5d8e764c50477eb139beefdc1f
MD5 f32a46e0edff9f7b61e3a7ac55299459
BLAKE2b-256 62c32d2403d7145f7278c35c2b4d3bd36456a658743d3488ac4292a6723c86e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: waveletec-0.3.0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 52.8 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.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b9bfed24130f21e8c7dc3fee3871ab757d7ceade795358dfe4c24601c12f634
MD5 b50bb49e825ef142bd92aad702b9b302
BLAKE2b-256 4564ddc643a89f23c4dbb450a576d4a95b9239a719c8bc5dd14634e00a8d59bb

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