NonLinLoc icon indicating copy to clipboard operation
NonLinLoc copied to clipboard

Takeoff angle grid question

Open sboltz opened this issue 4 years ago • 3 comments

Hello,

I use NonLinLoc pretty extensively for locating induced seismic events in shallow, heterogeneous environments. I tried to retrieve the takeoff angles from the grids by loading the grid using a python code that I have written. When I do this, the grid values that I see are on the order of 1e-30 - 1e-40, which doesn't make much sense to me. I know that my code works correctly because I can use it to load the velocity model or travel time grids without issue. Additionally, events locate reasonably, so I know I didn't do something grossly incorrect.

Is there something different about how the angle data is stored (I assume it should just be degrees?) compared to other grid outputs, or is there another setting that I need to change in the Grid2Time control file besides setting angleMode to ANGLES_YES?

I appreciate your help.

Thanks, Shawn

sboltz avatar Sep 30 '20 21:09 sboltz

Takeoff angles are encoded in a C "union", so you need some trick to read them, as explained here

Take a look at my python implementation nllgrid if you need some guidance 😉

claudiodsf avatar Oct 01 '20 05:10 claudiodsf

Yes, @claudiodsf comments and links explain the angle encoding and how to access the values. The purpose of this encoding is to fit 3 take-off values (quality, dip, azimuth) into a 4 byte float for compatibility with NLL velocity and time grids, and to save space in general. Anthony

alomax avatar Oct 01 '20 07:10 alomax

Ah. Whoops. I should have finished reading the documentation. That makes a lot more sense. Thank you for your help and quick response @claudiodsf and @alomax!

sboltz avatar Oct 01 '20 14:10 sboltz