-
Notifications
You must be signed in to change notification settings - Fork 10
Vertical deformation option #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add the include_vertical_vel configuration option to enable fitting vertical (up) velocity components in addition to horizontal (east/north). Changes: - config.py: Add include_vertical_vel boolean flag (default: false) - operators.py: Update data vector construction to use interleave3() for 3-component velocities when enabled, affecting: - _get_data_vector_no_meshes() - _get_data_vector() - _get_data_vector_eigen() - _get_weighting_vector() - _get_weighting_vector_eigen() - solve.py: Update estimation residual extraction and station velocity assignment to handle 3-component case When include_vertical_vel is true, station data must include up_vel and up_sig columns. The data vectors and weighting matrices grow from 2*n_stations to 3*n_stations rows for the station portion.
Refactor the full dense operator building logic to properly support the vertical velocity feature in eigen mode. Key changes: - Remove row filtering from eigen_to_velocities construction; keep all 3 velocity components and let station_row_keep_index handle selection - Extract common operator insertion logic into helper functions: - _insert_common_block_operators(): block rotation, constraints - _insert_block_strain_and_mogi(): strain and Mogi sources - Simplify full_dense_operator property by removing conditional branches for block-only and eigen cases (now handled uniformly) - Update get_full_dense_operator_eigen() to use the new helpers This fixes incorrect operator dimensions when include_vertical_vel is enabled in combination with eigen=True.
Add the include_vertical_vel field to the WNA config file with an explicit false value. This ensures the config validates correctly now that the field exists in the schema, and documents the intended behavior for this dataset (horizontal velocities only).
Regenerate the pytest-arraydiff reference files for the test_operator_eigen_to_velocities test after the operator construction refactoring. The numerical values changed due to the removal of row filtering in eigen_to_velocities construction. The operators now retain all three velocity components internally, with row selection deferred to operator assembly time. Files updated: - tests/reference/test_operator_eigen_to_velocities_test_japan_config.txt - tests/reference/test_operator_eigen_to_velocities_test_wna_config.txt
Add a docstring to the write_output() function describing its purpose and the Estimation parameter it accepts. Also fix mesh name extraction in HDF5 output: replace manual path parsing (os.path.splitext/basename) with the mesh.name property, which is cleaner and more reliable.
Add # type: ignore[attr-defined] comments to PyMC math operations that trigger spurious mypy/pyright errors. These arise because the type stubs for pm.math don't fully cover sigmoid, softplus, and numpy-like array methods. Also improve code clarity: - Extract slip kinds tuple with explicit Literal types to help type inference in the mesh_component loop - Reword error message for conflicting rate/coupling constraints
The change from pm.CustomDist to pm.StudentT in commit 17d958e broke the Voronoi weighting feature when mcmc_station_weighting == 'voronoi'. The computed weight array from Voronoi cells was being ignored because pm.StudentT doesn't accept custom logp/random functions. This restores pm.CustomDist with the weighted likelihood function that applies the area-based weights to the log-probability.
Replace hardcoded '2 * self.n_stations' with 'self.end_station_row' in both n_operator_rows and n_operator_rows_eigen properties. This fixes incorrect operator row counts when include_vertical_vel is enabled. With vertical velocities, end_station_row equals 3*n_stations rather than 2*n_stations, and the row count must reflect this to avoid dimension mismatches during operator assembly.
…ty=False Apply station_row_keep_index to eigen_to_velocities[i] before matrix multiplication, matching the pattern used in the non-eigen TDE case and in _get_full_dense_operator_eigen. Without this fix, when include_vertical_velocity is False, vel_tde has shape (2*n_stations,) but the matrix-vector product produces (3*n_stations,), causing a broadcasting error.
Verifies that vel_tde and its east/north components are computed with correct shapes and finite values when using eigen decomposition.
The eigen_to_velocities operator now includes all 3 velocity components (east, north, up) instead of just 2. Remove the reshape/concatenate logic that was adding a zero vertical component since the operator now provides it directly.
Replace hardcoded 2 * n_stations with index.end_station_row for consistency with include_vertical_velocity support.
|
Hi @elc45,
Remote git checkout vertical-deform
git fetch upstream
git merge upstream/mainIf merge conflicts occur in git checkout --theirs pixi.lock
pixi lock
git add pixi.lock
git merge --continueThis reminder will be minimized automatically once Generated automatically by |
No description provided.