iris-edu / irisws-syngine

Project components for the IRIS Synthetics Engine (irisws-syngine) web service
GNU General Public License v2.0
2 stars 0 forks source link

Bug report: wrong head parameter in sac file #38

Closed wangliang1989 closed 7 years ago

wangliang1989 commented 7 years ago

if url is http://service.iris.edu/irisws/syngine/1/query?origintime=2017-04-15T06:30:00.000\&sourcelatitude=0\&sourcelongitude=100\&sourcedepthinmeters=20000\&sourcemomenttensor=1.04e22,-0.039e22,-1e22,0.304e22,-1.52,-0.119e22\&receiverlatitude=0\&components=ZRT\&format=saczip\&model=prem_i_2s\&units=velocity\&receiverlongitude=105 , the head parameter of dist should be about 556.599. But, the fact is 20004.3

manoch-iris commented 7 years ago

Thank you for reporting. We have confirmed this issue and also found out that if we change lat values to a non-zero value (for example 0.1), DIST field is populated correctly. The issue appears to happen when both lat values are set to zero. Ticket 55 has been opened under Instaseis

krischer commented 7 years ago

Fixed in https://github.com/krischer/instaseis/pull/57.

You can fix this by just installing geographiclib. The vincenty formula ObsPy uses to calculate distances on ellipsoids in unstable in certain special cases. If geographiclib is available ObsPy will use and their more sophisticated calculations are always stable. The linked PR just makes geographiclib a hard dependency and adds a test.

manoch-iris commented 7 years ago

Syngine is upgraded to instaseis 1.2.0 and DIST field is populated correctly.