示例#1
0
 def _get_moment_tensor_from_ndk_string(self, ndk_string):
     """
     Reads the moment tensor from the ndk_string and returns an instance of
     the GCMTMomentTensor class.
     By default the ndk format uses the Up, South, East (USE) reference
     system.
     """
     moment_tensor = GCMTMomentTensor('USE')
     tensor_data = _read_moment_tensor_from_ndk_string(ndk_string, 'USE')
     moment_tensor.tensor = tensor_data[0]
     moment_tensor.tensor_sigma = tensor_data[1]
     moment_tensor.exponent = tensor_data[2]
     return moment_tensor
 def _get_moment_tensor_from_ndk_string(self, ndk_string):
     """
     Reads the moment tensor from the ndk_string and returns an instance of
     the GCMTMomentTensor class.
     By default the ndk format uses the Up, South, East (USE) reference
     system.
     """
     moment_tensor = GCMTMomentTensor('USE')
     tensor_data = _read_moment_tensor_from_ndk_string(ndk_string, 'USE')
     moment_tensor.tensor = tensor_data[0]
     moment_tensor.tensor_sigma = tensor_data[1]
     moment_tensor.exponent = tensor_data[2]
     return moment_tensor