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.
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.txtconda create -n wavec --file requirements.txtconda create -f environment.yml
Usage
(Recommended) Using EddyPro
- Make sure EddyPro® is installed.
- 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".
- Run waveletec:
This requirespip install waveletecimport 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_STARTandTIMESTAMP_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 asco2.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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file waveletec-0.3.0.1.0.tar.gz.
File metadata
- Download URL: waveletec-0.3.0.1.0.tar.gz
- Upload date:
- Size: 46.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77ac0d24eda7585e50af32830f015fea5c00b89f897ac7b102d4edaa442e468e
|
|
| MD5 |
3d07b93231506aeffe66f09116920123
|
|
| BLAKE2b-256 |
508f64a20f7488aed135ddfd80d26e38f36ef9425da9b57e4aab47a77b129d55
|
File details
Details for the file waveletec-0.3.0.1.0-py3-none-any.whl.
File metadata
- Download URL: waveletec-0.3.0.1.0-py3-none-any.whl
- Upload date:
- Size: 66.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26855df5c641642b176d8f431b6a1216e4c82a470d6a355de9f9385461e99665
|
|
| MD5 |
913dbba4bd5a4f9c39d25753b00a40c5
|
|
| BLAKE2b-256 |
9d02842568cc587c56e0415801b876d037f6c17a9e422646e43f0728663ca315
|