Skip to content

Commit

Permalink
Sorted fixImages in case there is no image tag in the xml
Browse files Browse the repository at this point in the history
  • Loading branch information
matty-jones committed Apr 24, 2018
1 parent e094cf9 commit 555449d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/fixImages/fixImages.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ def checkBonds(morphology, bondDict):


def zeroOutImages(morphology):
if len(morphology['image']) == 0:
for _ in morphology['position']:
morphology['image'].append([0, 0, 0])
for atomID, image in enumerate(morphology['image']):
if image != [0, 0, 0]:
morphology['image'][atomID] = [0, 0, 0]
Expand Down

0 comments on commit 555449d

Please sign in to comment.