This file documents all notable changes to this project.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning. Changes are described in the past tense and the effects of changes are described in the imperative mood.
Refactoring the main program in progress:
chflux/chflux.py
chflux/io/parsers.py
chflux/io/readers.py
- @TODO:
iotools.load_tabulated_data
-> [X]io.readers.read_tabulated_data
, [ ]io.parsers.parse_timestamp
- @TODO: rename
iotools
to_iotools
for deprecation. - @TODO: test
parsers
andreaders
in the newchflux
main program
@TODO:
DataFrame.set_value()
is deprecated; use.at[]
instead.- Use double spaces at sentence ending in comments and docstrings; for better readability in a monospace typeface.
-
io/readers.py
-
io/parsers.py
-
- Simplify function arguments using OOP.
- Replace the Theil--Sen estimator with a more efficient robust linear regression method (perhaps MM-estimator?).
- Use
pandas.Timestamp
as the standard timestamp passed between functions.
- The file list returned by
glob.glob()
is not ordered by name. It has been fixed withsorted()
.
- Standardized the style of the
changelog.md
file.
- A bug concerning the figure legend. Starting from
matplotlib 2.1.0
, it seems thathandles
andlabels
must be supplied tolegend()
as arguments not keywords. Were they given as keywords,legend()
would have default values for them, and this causes aTypeError: __init__() got multiple values for argument 'handles'
.
- A quality flag calculated from the spread between the flux values from three fitting methods.
- An option to save configuration files in the output folder.
- A timelag method,
'prescribed'
, which reads external timelag data files to determine timelags.
- A bounded timelag optimization method.
- Rules to filter warning messages for array division by zero or by NaN.
- Improved the daily summary plot of chamber fluxes.
- Changed the output directory of curve fitting diagnostics to the subfolder
diag
in the data folder.
- A bug in the timelag optimization function, when
closure_period_only
is set toFalse
. - A bug that crashed the program when skipping days with missing data.
- Baseline correction options:
'median'
,'mean'
, and'none'
. - Timelag optimization method:
'optimized'
.
- Default units for predefined species (
h2o
,co2
,cos
,co
,ch4
,n2o
). The user must now define the units explicitly in the configuration file, if units in the input data differ from the default. - Improved the filtering mechanism for warning messages.
- An option
load_data_by_day
in the configuration to load and process data by daily chunks. This will be useful when dealing with a large number of input data files.
- Replaced
numpy.isclose
withmath.isclose
for accuracy.
- An error in the CO concentration unit.
- A bug in assigning temperature and flow rate sensors to chambers.
- Plots for the daily summary of fluxes.
- An option
save_daily_plots
in the configuration file to enable plotting the daily summary of fluxes.
- Fixed the issue that an empty
conc_atmb
array caused the concentration-fitting plot to crash. - Measurement periods with negative flow rates will not be used for flux calculation.
- Unreasonably large water concentration will not be used for dew temperature calculation.
- An option
process_recent_period
in the configuration. IfTrue
, this lets the program to process only the data over the last few days instead of all available data. The number of days to trace back during processing is specified with the optiontraceback_in_days
.
- Default configuration file changed from YAML (
config.yaml
) to Python (default_config.py
). - Improved data reading performance for a large number of CSV files.
- Failure of regression caused by NaN values in the concentration data. NaN values are now ignored.
- Parameter error estimates for the nonlinear fitting method.
- Three times boost in performance compared to version 0.1.4 (not including plotting).
- Moved the reading of chamber configuration to the main script (
flux_calc.py
). - Moved the timestamp conversion to the function
load_tabulated_data()
. - Output variables, except the day of year number, are now rounded off to 6 decimal digits.
- The option
timestamp_format
in the configuration file.
- The function that converts timestamps to day of year values (float).
- The function that checks the starting year of the loaded data.
- A general function to parse tabulated data.
- Date parsing options for
pandas.read_csv()
.
- Functions to load each type of tabulated data input.
- A bug regarding the year number. The year number must now be given explicitly when using the day of year number as the time variable.
- An
is_leaf_chamber
identifier in the chamber description file. - Support for leaf area auxiliary data files. Now the program can takes leaf area time series in the calculation rather than using fixed values over the whole period. If the
separate_leaf_data
option is enable, leaf chambers specified withis_leaf_chamber == True
will use external leaf area data. - The
chamber_config_filepath
option in the configuration to specify the file name of the chamber description file. The default chamber description file ischamber.yaml
.
- A bash script for the test case.
- Support for separate flow data files using the
load_flow_data()
function.
- Refined the saturation vapor pressure and the dew temperature functions.
- Refined summary statistics functions in
common_func.py
:resist_mean()
: outlier-resistant meanresist_std()
: outlier-resistant standard deviationIQR_func()
: interquartile range
- List of physical constants moved from
config.yaml
tocommon_func.py
.
- A chamber description file
chamber.yaml
. - A chamber lookup function that generates a lookup table from the configuration file.
- Flow data settings in the configuration file.
- Now use the
dict.update()
method for user customized configuration file. - Change variable names of the standard errors of fluxes from
sd_flux_*
tose_flux_*
.
- A bug regarding the chamber schedule.
- A configuration file.
- Curve fitting plots.
- The main script was reorganized into functions.
- Reformatted the code to comply with the PEP8 standard.
- A bug regarding the year number in
flux_calc.flux_calc()
.
- The project was created by Wu Sun ([email protected]).