INNER CODE UNIT · Python
get_boltztrap2
SMTG-Bham/ThermoParser · tp/cli/cli.py:528
def get_boltztrap2(boltztrap2_hdf5, quantity, doping, direction, temperature):
"""Prints BoltzTraP2 values at given conditions.
Requires a tp-btp2.hdf5 file.
"""
# I'm making a few of these for different inputs so it doesn't get
# too unwieldly checking which source they're from, but they could
# also be combined.
data = tp.data.load.boltztrap2(boltztrap2_hdf5, quantity)
dims = data['meta']['dimensions'][quantity]
if 'temperature' not in dims:
temperature = None
if 'doping' not in dims:
doping = None
data = tp.data.utilities.resolve(data, quantity, direction=direction,