these header fields are autoset by the SAC software, if the LCALDA flag in the sac header is set to true.
The question is whether or not ObsPy should do the same and autoset those fields.
Oops, I read the email too quickly...
This is easy enough to change, but for some reason it causes a failure in the realtime.rttrace module tests. In the meantime, you can use this snippet to get an ObsPy Trace with the distances set:
from obspy.io.sac import SACTrace
sac = SACTrace.read('XX.LSo1.00.SHX')
tr = sac.to_obspy_trace()
You could also use this snippet to redefine the “read” function at the top of your code, so that distances are automatically set whenever you call the “read” function on a SAC file.
I’ll look into the test failure and submit a fix this weekend.