Skip to content

Enhance HDF5 loading and refactor kernel combination logic - #43

Merged
xumi1993 merged 3 commits into
develfrom
dev-2.1.2
Nov 3, 2026
Merged

xumi1993 merged 3 commits into
develfrom
dev-2.1.2

Conversation

@xumi1993

@xumi1993 xumi1993 commented Nov 1, 2026

Copy link
Copy Markdown
Member

This pull request makes important corrections and clarifications to the kernel combination and optimization logic, primarily to ensure that the physical model values are properly included in sensitivity calculations and that the chain rule is consistently applied. The changes also improve error handling and clarify documentation.

Kernel combination and chain rule corrections:

  • The kernel combination in preproc::combine_kernels now multiplies sensitivities by the physical model values (vs, vp, rho) for all relevant terms, ensuring the correct application of the chain rule for multiplicative parameters. This affects both Rayleigh and Love wave cases, as well as density kernels. [1] [2] [3] [4]

Optimization and gradient handling:

  • The computation of the global dot product in field_dot_global is simplified: the chain rule is now handled entirely in combine_kernels, so the dot product is always between the kernel and the direction, with a special case for radial anisotropy to account for vsh.
  • Documentation in calc_descent_angle and wolfe_condition is clarified to reflect the new chain rule handling and the relationship between multiplicative updates and the descent step. [1] [2]

Model loading and error handling:

  • When loading 3D models, the code now falls back from vsv to vs if vsv is not present for radial anisotropy, with an informational log message.
  • Error handling for HDF5 file loading is improved by catching H5::Exception and logging a more informative error message.

…' is absent for radial anisotropy and improve error handling for H5 exceptions
…arameters for radial anisotropy and enhance sensitivity calculations
@xumi1993
xumi1993 merged commit 4ade987 into devel Nov 3, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant