Skip to content

doc: materials for Kalman filter articles#133

Open
pipipyau wants to merge 8 commits into
mainfrom
132-reconstruction-of-long-term-complex-system-dynamics
Open

doc: materials for Kalman filter articles#133
pipipyau wants to merge 8 commits into
mainfrom
132-reconstruction-of-long-term-complex-system-dynamics

Conversation

@pipipyau

Copy link
Copy Markdown
Collaborator

No description provided.

@pipipyau pipipyau self-assigned this Jun 16, 2026
@pipipyau pipipyau added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 16, 2026
@pipipyau pipipyau linked an issue Jun 16, 2026 that may be closed by this pull request
@kilo-code-bot

kilo-code-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Resolved Issues (from previous review)

All previously identified issues in dendrochronological_series.ipynb have been addressed:

File Line Issue Fix Status
dendrochronological_series.ipynb 321 (new) dplR 71-series path pointed to wrong directory Now uses DPLR_DIR variable ✅ Fixed
dendrochronological_series.ipynb 324 (new) dplR 15-series path pointed to wrong directory Now uses DPLR_DIR variable ✅ Fixed
dendrochronological_series.ipynb 31 Output directory may not exist before savefig Added OUTPUT_DATA_DIR.mkdir(parents=True, exist_ok=True) ✅ Fixed
.gitignore - Broad research/data exclusion hid outputs Replaced with specific paths ✅ Fixed
dendrochronological_series.ipynb 160 (new) init_kf() only assigned F for Kasdin method Removed conditional, F is now always assigned ✅ Fixed

New Changes in This Increment

File Change Assessment
StatTools/analysis/dpcca.py Changed np.linalg.inv(R) to np.linalg.pinv(R, rcond=1e-10) ✅ Good - improves numerical stability for singular/near-singular matrices
pyproject.toml Pinned setuptools-scm==8.2.0 ✅ Acceptable - intentional version lock
research/kalman_filter/README.md Added documentation ✅ No issues
research/kalman_filter/__init__.py Added module exports ✅ No issues
examples/svd_dfa_demo.ipynb Moved from research/kalman_filter/ ✅ No issues
data/tree_rwi.csv Added tree ring width data ✅ No issues
Files Reviewed (8 files)
  • .gitignore - 0 issues
  • StatTools/analysis/dpcca.py - 0 issues
  • pyproject.toml - 0 issues
  • research/kalman_filter/README.md - 0 issues
  • research/kalman_filter/__init__.py - 0 issues
  • research/kalman_filter/reconstruction_of_long_term_complex_system_dynamics/__init__.py - 0 issues
  • research/kalman_filter/reconstruction_of_long_term_complex_system_dynamics/dendrochronological_series.ipynb - 0 issues (all fixes verified)
  • research/kalman_filter/reconstruction_of_long_term_complex_system_dynamics/data/tree_rwi.csv - 0 issues (data added)
Previous Review Summaries (4 snapshots, latest commit 2ccf3dc)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 2ccf3dc)

Status: No Issues Found | Recommendation: Merge

All previously identified issues have been addressed in this incremental commit:

Resolved Issues (from previous review)

File Line Issue Fix Status
dendrochronological_series.ipynb 316 (old) → 321 (new) dplR 71-series path pointed to wrong directory Now uses DPLR_DIR variable ✅ Fixed
dendrochronological_series.ipynb 319 (old) → 324 (new) dplR 15-series path pointed to wrong directory Now uses DPLR_DIR variable ✅ Fixed
dendrochronological_series.ipynb 401 (old) → 406 (new) Output directory may not exist before savefig Added OUTPUT_DATA_DIR.mkdir(parents=True, exist_ok=True) ✅ Fixed
.gitignore 23 (old) Broad research/data exclusion hid outputs Replaced with specific paths ✅ Fixed
dendrochronological_series.ipynb 154 (old) → 160 (new) init_kf() only assigned F for Kasdin method Removed conditional, F is now always assigned ✅ Fixed
Files Reviewed (3 files)
  • .gitignore - 0 issues (updated correctly)
  • pyproject.toml - 0 issues (version pin change is intentional)
  • dendrochronological_series.ipynb - 0 issues (all fixes verified)

Previous review (commit e2b2e55)

Status: 5 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 2
Issue Details (click to expand)

CRITICAL

File Line Issue

WARNING

File Line Issue
research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series.ipynb 316 dplR 71-series output path points to .../data instead of the bundled file under .../dplR/results/dplr/.
research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series.ipynb 319 dplR 15-series augmented output path points to .../data instead of the bundled file under .../dplR/results/dplr/.
research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series.ipynb 401 plt.savefig() writes to research/data/output/..., but that directory is not created in the notebook or present in the repo.

SUGGESTION

File Line Issue
research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series.ipynb 154 init_kf() only assigns F for method == "Kasdin" but passes F unconditionally to KalmanFilter.
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
.gitignore 23 research/data remains ignored, so generated outputs/model signals under that path are untracked and other contributors may not be able to reproduce analyses that depend on them.
Files Reviewed (18 files)
  • research/kalman_filter/README.md - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/data/tree_rwi.csv - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series.ipynb - 4 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series_h_acf_noise.ipynb - 0 issues (deleted)
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/README.md - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/data/norw010-rwl-noaa.txt - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/data/norw010.rwl - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/data/norw010.txt - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/examples/preprocessingtrw.ipynb - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/results/dplr/tree_rwi_dplr_15.csv - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/results/dplr/tree_rwi_dplr_71.csv - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/results/python/tree_rwi_python_15.csv - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/results/python/tree_rwi_python_71.csv - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/scripts/Download_rwl.R - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/scripts/Preprocess_rwl.R - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/scripts/preprocessingtrw.py - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/gen_filter_save.py - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/synthetic_benchmarks.ipynb - 0 issues

Previous review (commit 9d03f1d)

Status: 5 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 2
Issue Details (click to expand)

CRITICAL

File Line Issue

WARNING

File Line Issue
research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series.ipynb 316 dplR 71-series output path points to .../data instead of the bundled file under .../dplR/results/dplr/.
research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series.ipynb 319 dplR 15-series augmented output path points to .../data instead of the bundled file under .../dplR/results/dplr/.
research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series.ipynb 401 plt.savefig() writes to research/data/output/..., but that directory is not created in the notebook or present in the repo.

SUGGESTION

File Line Issue
research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series.ipynb 154 init_kf() only assigns F for method == "Kasdin" but passes F unconditionally to KalmanFilter.
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
.gitignore 23 research/data remains ignored, so generated outputs/model signals under that path are untracked and other contributors may not be able to reproduce analyses that depend on them.
Files Reviewed (18 files)
  • research/kalman_filter/README.md - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/data/tree_rwi.csv - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series.ipynb - 4 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series_h_acf_noise.ipynb - 0 issues (deleted)
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/README.md - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/data/norw010-rwl-noaa.txt - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/data/norw010.rwl - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/data/norw010.txt - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/examples/preprocessingtrw.ipynb - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/results/dplr/tree_rwi_dplr_15.csv - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/results/dplr/tree_rwi_dplr_71.csv - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/results/python/tree_rwi_python_15.csv - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/results/python/tree_rwi_python_71.csv - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/scripts/Download_rwl.R - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/scripts/Preprocess_rwl.R - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dplR/scripts/preprocessingtrw.py - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/gen_filter_save.py - 0 issues
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/synthetic_benchmarks.ipynb - 0 issues

Previous review (commit d782c27)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (6 files)
  • .gitignore - 1 line changed
  • StatTools/analysis/dpcca.py - 1 line changed
  • examples/svd_dfa_demo.ipynb - file renamed
  • research/kalman_filter/README.md - new file
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series_h_acf_noise.ipynb - new file
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/gen_filter_save.py - new file
  • research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/synthetic_benchmarks.ipynb - new file
Other Observations (not in diff)
File Line Issue
.gitignore 23 Adding research/data means all data files referenced by the new notebooks (research/data/tree/, research/data/model_signals/) are untracked. Other contributors will not be able to reproduce the analysis from this repo alone without separately obtaining the data.
research/kalman_filter/README.md 2 Typo: "numererical" should be "numerical"
research/kalman_filter/README.md 2 Typo: "genertion" should be "generation"
research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/synthetic_benchmarks.ipynb 15 Hardcoded absolute path Path("/Users/a1/Downloads/model_signals") will break for any user other than the original author.
research/kalman_filter/reconstruction_of_long-term_complex_system_dynamics/dendrochronological_series_h_acf_noise.ipynb (in init_kf cell) init_kf() only sets F for method=="Kasdin" but uses F unconditionally when creating KalmanFilter. Currently safe because method is always "Kasdin", but a latent bug if the method parameter is ever changed.

Reviewed by laguna-m.1-20260312:free · Input: 963.9K · Output: 7K · Cached: 646.1K

pipipyau and others added 5 commits June 17, 2026 12:33
x = x.set_index("year").apply(pd.to_numeric, errors="coerce")

if keep_series is not None:
missing = sorted(set(keep_series) - set(x.columns))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconstruction of long-term complex system dynamics

1 participant