feature/port-to-py3 #11
16
PyLoT.py
16
PyLoT.py
@ -1406,12 +1406,18 @@ class MainWindow(QMainWindow):
|
|||||||
lat = origin.latitude
|
lat = origin.latitude
|
||||||
lon = origin.longitude
|
lon = origin.longitude
|
||||||
depth = origin.depth
|
depth = origin.depth
|
||||||
moment_magnitude = event.magnitudes[0]
|
if len(event.magnitudes): # if magnitude information exists, i.e., event.magnitudes has at least 1 entry
|
||||||
momentmag = '%4.1f' % moment_magnitude.mag
|
moment_magnitude = event.magnitudes[0]
|
||||||
if len(event.magnitudes) > 1:
|
momentmag = '%4.1f' % moment_magnitude.mag
|
||||||
local_magnitude = event.magnitudes[1]
|
if len(event.magnitudes) > 1:
|
||||||
localmag = '%4.1f' % local_magnitude.mag
|
local_magnitude = event.magnitudes[1]
|
||||||
|
localmag = '%4.1f' % local_magnitude.mag
|
||||||
|
else:
|
||||||
|
localmag = ' '
|
||||||
|
|
||||||
|
else:
|
||||||
|
momentmag = ' '
|
||||||
|
localmag = ' '
|
||||||
|
|
||||||
# text = '{path:{plen}} | manual: [{p:3d}] | auto: [{a:3d}]'
|
# text = '{path:{plen}} | manual: [{p:3d}] | auto: [{a:3d}]'
|
||||||
# text = text.format(path=event_path,
|
# text = text.format(path=event_path,
|
||||||
|
Loading…
Reference in New Issue
Block a user