groupeLIAMG / ttcr

Codes to do raytracing for geophysical applications
GNU General Public License v3.0
85 stars 34 forks source link

gradient of the raytrace function #51

Closed feyzarzu closed 2 years ago

feyzarzu commented 2 years ago

Hi, have you ever needed to take gradient of the "raytrace" function? Can you please give some advice about taking the gradient? I am struggling to use JAX package for applying "automatic differentiation" to "raytrace" function. However, since the slowness model is not a variable of the raytrace function (>> grid.set_slowness(model) ), I am having some problems. Or is the numeric method the only way to take the derivative of the raytrace function? Thank you

bernard-giroux commented 2 years ago

I'm not familiar with JAX... You want to differentiate with respect to which variable?

If you mean the derivative of travel time w/r to slowness, this is matrix L, that is returned if you pass compute_L=True to raytrace.