Dear all,
recently my attention was drawn to the fact that in the InterTables
database files the different oxidation states/radicals of the atoms are
listed separately. All available data from this database are now available
in xrayutilities (these changes are included in xrayutilities from version
1.2.0 on)
For example Mn2+ is found as
import xrayutilties as xu
xu.materials.elements.Mn2p
Radicals are denoted by a 'dot' in the name, e.g. the radical O2-. is found
as
xu.materials.elements.O2mdot
At the same time I cleaned up a bit the code dealing with this database and
could significantly improve the speed of the database access.
In course of this I switched from using pytables to h5py for the HDF5 file
access. This means you might need to install this package. It is, however,
likely that you have it already. pytables will be no longer required!
cheers
dominik
ps: here some of the incredible differences of time measurements before and
after the recent changes:
before the update
------------------------
%time xu.materials.elements.Mn.f0(linspace(0,10,10000))
CPU times: user 704 ms, sys: 0 ns, total: 704 ms
Wall time: 705 ms
%time xu.materials.elements.Mn.f1(linspace(1000,10000,100000))
CPU times: user 21.9 s, sys: 4 ms, total: 21.9 s
Wall time: 21.9 s
after the update
---------------------
%time xu.materials.elements.Mn.f0(linspace(0,10,10000))
CPU times: user 4 ms, sys: 0 ns, total: 4 ms
Wall time: 5.74 ms
For this case the speedup is a factor of ~100
%time xu.materials.elements.Mn.f1(linspace(1000,10000,100000))
CPU times: user 4 ms, sys: 0 ns, total: 4 ms
Wall time: 4.39 ms
For this maybe slightly academic case this is a speedup of 5000!!!
|