Skip to content

Commit

Permalink
Failover magnitude retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosT committed Jun 3, 2024
1 parent ecf703f commit 0a571d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ def getOrigin(cfg, evt, historical):

def getMagnitude(evt, org):
# retrieve associated magnitude
return [m for m in evt.magnitudes if m.origin_id==org.resource_id][0]
try:
return [m for m in evt.magnitudes if m.origin_id==org.resource_id][0]
except:
return evt.preferred_magnitude()

def getFocalMechanism(evt):
# retrieve "best" focal info (if any), else last found
Expand Down
2 changes: 1 addition & 1 deletion src/gisola.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
__credits__ = ["Nikolaos Triantafyllis (triantafyl@noa.gr), Ioannis Venetis (venetis@unipi.gr), Ioannis Fountoulakis (ifountoul@noa.gr), Erion-Vasilis Pikoulis (pikoulis@ceid.upatras.gr), Efthimios Sokos (esokos@upatras.gr), Christos Evangelidis (cevan@noa.gr)"]
__author__= 'Nikolaos Triantafyllis (triantafyl@noa.gr)'
__license__ = "GPLv3"
__version__ = "1.2.1"
__version__ = "1.2.2"
__maintainer__ = "Nikolaos Triantafyllis"
__email__ = "triantafyl@noa.gr"
__status__ = "Production"
Expand Down

0 comments on commit 0a571d9

Please sign in to comment.