Skip to content

Commit

Permalink
Merge branch 'add-stitched-similarity' of github.com:scottstanie/dolp…
Browse files Browse the repository at this point in the history
…hin into add-stitched-similarity
  • Loading branch information
scottstanie committed Oct 11, 2024
2 parents e4c7378 + 2fd1696 commit 2a70595
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down
3 changes: 1 addition & 2 deletions src/dolphin/phase_link/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions src/dolphin/workflows/wrapped_phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,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,
Expand Down

0 comments on commit 2a70595

Please sign in to comment.