How to use the ubermagtable.read function in ubermagtable

To help you get started, we’ve selected a few ubermagtable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ubermag / oommfc / oommfc / data.py View on Github external
def energy(self):
        _dict = {'Demag': 'Demag::Energy',
                 'Exchange': 'UniformExchange::Energy',
                 'UniaxialAnisotropy': 'UniaxialAnisotropy::Energy',
                 'Zeeman': 'FixedZeeman::Energy',
                 'Hamiltonian': 'RungeKuttaEvolve:evolver:Total energy'}
        td = oc.TimeDriver()
        td.drive(self.system, derive='energy')

        dirname = os.path.join(self.system.name,
                               f'drive-{self.system.drive_number-1}')
        odt_file = max(glob.iglob(os.path.join(dirname, '*.odt')),
                       key=os.path.getctime)

        dt = ut.read(odt_file, rename=False)

        return dt[_dict[self.cls]][0]

ubermagtable

Python package for manipulating tabular data.

BSD-3-Clause
Latest version published 7 months ago

Package Health Score

64 / 100
Full package analysis

Popular ubermagtable functions

Similar packages