|
From: Kanika K. <kk...@uc...> - 2016-09-07 19:01:22
|
Hello all,
I have been trying to get coordinates of X,Y,Z from particle list using the
function 'PickPosition' from ipytom as follows:
ipytom
from pytom.basic.structures import PickPosition
pl=PickPosition()
pl.fromXMLFile(pl.xml')
But I run into the following error:
UnboundLocalError Traceback (most recent call last)
<ipython-input-5-71b11edb47f3> in <module>()
----> 1 pl.fromXMLFile ('pl.xml')
/usr/local/pytom/basic/structures.py in fromXMLFile(self, filename)
72 lines = readStringFile(filename)
73
---> 74 self.fromStr(lines)
75
76 def toXMLFile(self,filename):
/usr/local/pytom/basic/structures.py in fromStr(self, string)
45 root = etree.fromstring(string)
46
---> 47 self.fromXML(root)
48
49 def __str__(self):
/usr/local/pytom/basic/structures.py in fromXML(self, xmlObj)
3674 TypeError('PickPosition: You must provide a valid
PickPosition XML object.')
3675
-> 3676 self._x = float(shift_element.get('X'))
3677 self._y = float(shift_element.get('Y'))
3678 self._z = float(shift_element.get('Z'))
UnboundLocalError: local variable 'shift_element' referenced before
assignment
Am I doing it right? How can I get the X,Y,Z coordinates of particles in a
matrix from particle file?
Thanks!
|