本文整理汇总了Python中obspy.core.event.Origin.public_id方法的典型用法代码示例。如果您正苦于以下问题:Python Origin.public_id方法的具体用法?Python Origin.public_id怎么用?Python Origin.public_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类obspy.core.event.Origin
的用法示例。
在下文中一共展示了Origin.public_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_multipleOrigins
# 需要导入模块: from obspy.core.event import Origin [as 别名]
# 或者: from obspy.core.event.Origin import public_id [as 别名]
def test_multipleOrigins(self):
"""
Parameters of multiple origins should not interfere with each other.
"""
origin = Origin()
origin.public_id = 'smi:ch.ethz.sed/origin/37465'
origin.time = UTCDateTime(0)
origin.latitude = 12
origin.latitude_errors.confidence_level = 95
origin.longitude = 42
origin.depth_type = 'from location'
self.assertEqual(origin.latitude, 12)
self.assertEqual(origin.latitude_errors.confidence_level, 95)
self.assertEqual(origin.latitude_errors.uncertainty, None)
self.assertEqual(origin.longitude, 42)
origin2 = Origin()
origin2.latitude = 13.4
self.assertEqual(origin2.depth_type, None)
self.assertEqual(origin2.resource_id, None)
self.assertEqual(origin2.latitude, 13.4)
self.assertEqual(origin2.latitude_errors.confidence_level, None)
self.assertEqual(origin2.longitude, None)