From 3df9ba10a29ca63ce177aaaef4a6a5381b8c22f1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 18:14:10 -0400 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate (#443) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/psf/black: 24.8.0 → 24.10.0](https://github.com/psf/black/compare/24.8.0...24.10.0) - [github.com/astral-sh/ruff-pre-commit: v0.6.8 → v0.6.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.8...v0.6.9) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 047ae1e9..570229f3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v4.6.0" + rev: "v5.0.0" hooks: # https://github.com/pre-commit/pre-commit-hooks/issues/718 # - id: check-added-large-files # Fails with git v1.8.3 @@ -20,13 +20,13 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: "24.8.0" + rev: "24.10.0" hooks: - id: black args: [--preview] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.8 + rev: v0.6.9 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] From 68020015317f80085362d1419b5afbd11fa30cae Mon Sep 17 00:00:00 2001 From: Scott Staniewicz Date: Thu, 10 Oct 2024 17:24:52 -0400 Subject: [PATCH 2/3] Pass through `phase_linking.output_reference_idx` to avoid reference resets (#445) --- src/dolphin/workflows/wrapped_phase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dolphin/workflows/wrapped_phase.py b/src/dolphin/workflows/wrapped_phase.py index 3fa38bb8..16b9eb5c 100644 --- a/src/dolphin/workflows/wrapped_phase.py +++ b/src/dolphin/workflows/wrapped_phase.py @@ -164,6 +164,7 @@ def run( slc_vrt_stack=vrt_stack, output_folder=pl_path, ministack_size=cfg.phase_linking.ministack_size, + output_reference_idx=cfg.phase_linking.output_reference_idx, new_compressed_reference_idx=new_compressed_slc_reference_idx, half_window=cfg.phase_linking.half_window.model_dump(), strides=strides, From da4a875d9843b3cd9eb2bf5d5e2d04057a792931 Mon Sep 17 00:00:00 2001 From: Scott Staniewicz Date: Thu, 10 Oct 2024 17:25:41 -0400 Subject: [PATCH 3/3] Set the input to EVD to be weighted by correlation (#428) * Set the input to EVD to be weighted by correlation * consolidate EVD call --- src/dolphin/phase_link/_core.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dolphin/phase_link/_core.py b/src/dolphin/phase_link/_core.py index 3d452121..44796018 100644 --- a/src/dolphin/phase_link/_core.py +++ b/src/dolphin/phase_link/_core.py @@ -401,9 +401,9 @@ def process_coherence_matrices( """ rows, cols, n, _ = C_arrays.shape + evd_eig_vals, evd_eig_vecs = eigh_largest_stack(C_arrays * jnp.abs(C_arrays)) if use_evd: # EVD - evd_eig_vals, evd_eig_vecs = eigh_largest_stack(C_arrays) eig_vals, eig_vecs = evd_eig_vals, evd_eig_vecs estimator = jnp.zeros(eig_vals.shape, dtype=bool) else: @@ -449,7 +449,6 @@ def process_coherence_matrices( inv_has_nans_3d = jnp.tile(inv_has_nans[:, :, None], (1, 1, n)) # For EVD, or places where inverting |Gamma| failed: fall back to computing EVD - evd_eig_vals, evd_eig_vecs = eigh_largest_stack(C_arrays) eig_vecs = lax.select( inv_has_nans_3d, # Run this on True: EVD, since we failed to invert: