#TOPOLOGICAL CHARGE ATTRIBUTE ERROR
shivanirstogi opened this issue · 3 comments
Dear Sir,
Hope you are doing well in this pandemic situation. I am facing issue in calculation of topological charge for my program. It is showing attribute error all the time i use the command for calculating the same. Kindly, help me in resolving this problem.
System.m.plane(z=49e-9).topological_charge()
AttributeError Traceback (most recent call last)
in
----> 1 System.m.plane(z=49e-9).topological_charge()
~\miniconda3\envs\ubermag\lib\site-packages\discretisedfield\field.py in getattr(self, attr)
673 else:
674 msg = f'Object has no attribute {attr}.'
--> 675 raise AttributeError(msg)
676
677 def dir(self):
AttributeError: Object has no attribute topological_charge.
practice1 - Jupyter Notebook.pdf
Hi @shivanirstogi, we have changed the interface for computing topological charge in the last release. topological_charge
is now in discretisedfield.tools()
:
import discretisedfield.tools as dft
dft.topological_charge(system.m.plane(z=49e-9))
Please have a look at the documentation for more details: https://discretisedfield.readthedocs.io/en/latest/ipynb/field-tools.html#1.-Topological-charge/topological-charge-density