Skip to content

Commit

Permalink
Bugfix if fm already in xml from another source than Gisola
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosT committed May 29, 2024
1 parent a9c4b12 commit ecf703f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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 ([email protected]), Ioannis Venetis ([email protected]), Ioannis Fountoulakis ([email protected]), Erion-Vasilis Pikoulis ([email protected]), Efthimios Sokos ([email protected]), Christos Evangelidis ([email protected])"]
__author__= 'Nikolaos Triantafyllis ([email protected])'
__license__ = "GPLv3"
__version__ = "1.1.0"
__version__ = "1.2.1"
__maintainer__ = "Nikolaos Triantafyllis"
__email__ = "[email protected]"
__status__ = "Production"
Expand Down
8 changes: 4 additions & 4 deletions src/isola.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,10 @@ def gatherResults(cfg=None, evt=None, workdir=None, bestinvdir=None, revise=Fals
evt.origins=list(filter(lambda x: not x.resource_id==_fm[0].moment_tensor.derived_origin_id,evt.origins))
evt.magnitudes=list(filter(lambda x: not x.origin_id==_fm[0].moment_tensor.derived_origin_id,evt.magnitudes))

# this double for loop is needed in order to maintain the components attribdict
for _ in evt.focal_mechanisms:
for _i in range(1,len(_.extra.components.value)+1):
_.extra['components']['value']['component_'+str(_i)]['value']=AttribDict()
# this double for loop is needed in order to maintain the components attribdict
for _ in evt.focal_mechanisms:
for _i in range(1,len(_.extra.components.value)+1):
_.extra['components']['value']['component_'+str(_i)]['value']=AttribDict()

evt.focal_mechanisms.append(fm)
evt.origins.append(org)
Expand Down

0 comments on commit ecf703f

Please sign in to comment.