How to obtain the posterior probability of 2D distribution?

Thanks for your reply.

  • The rffw.rffw is a seismic waveform forward function for generate waveform data based on depth and vs.
  • Yes, rf_matrix and amp just depend on vs and depth in forward model. I want to get the depth and vs under the observations rf_matrix, amp. If possible, the dimensions of depth and vs can also be obtained (in other words, the number of layers of the model).
  • The custom likelihood is just a L2 likelihood fucntion (like The Equal Differential Time (EDT) likelihood function). I just want amp_forward_data and obs_waveform_data to be as close to rf_matrix and amp as possible. But for simplicity, it is assumed that σ is known.