Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
Numpydoc seems to fail if references are being used. Removed now, but we need to fix this in the future. Consider to not use LaTeX and render html maths and make a pdf instead as this is really sensitive to get to work.
  • Loading branch information
Espen Flage-Larsen committed Nov 21, 2019
1 parent 640973b commit a50f9bf
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 47 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = []

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down
22 changes: 11 additions & 11 deletions src/t4me/bandstructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,13 +904,12 @@ def fetch_velocities_along_line(self,
The :func:`interpolate` is used to perform the interpolation
of the data along the line.
.. warning:: The factor :math:`\\hbar^{-1}` is not returned and need to be included externally.
See Also
--------
interpolate
.. warning:: The factor : math: `\\hbar^{-1}` is not returned
and need to be included externally.
"""
# set logger
logger = logging.getLogger(sys._getframe().f_code.co_name) # pylint: disable=protected-access
Expand Down Expand Up @@ -976,13 +975,12 @@ def fetch_velocities_at_kpoints(self,
-----
The :func:`interpolate` is used to perform the interpolation.
.. warning:: The factor :math:`\\hbar^{-1}` is not returned and need to be included externally.
See Also
--------
interpolate
.. warning:: The factor : math: `\\hbar^{-1}` is not returned
and need to be included externally.
"""
# set logger
logger = logging.getLogger(sys._getframe().f_code.co_name) # pylint: disable=protected-access
Expand Down Expand Up @@ -1408,15 +1406,18 @@ def interpolate( # pylint: disable=too-many-locals # noqa: MC0001
if `velocities` is not supplied or `gen_velocities` is
set to False.
Notes
-----
.. todo:: DOCUMENT THE DIFFERENT INTERPOLATION SCHEMES,
OR AT LEAST ADD PROPER REFERENCES.
See Also
--------
linearnd
interpn
rbf
.. todo:: DOCUMENT THE DIFFERENT INTERPOLATION SCHEMES,
OR AT LEAST ADD PROPER REFERENCES.
"""

# set logger
Expand Down Expand Up @@ -3039,8 +3040,7 @@ def non_parabolic_velocity_2(k, effmass, a):
-----
Consult comments in :func:`non_parabolic_energy_1`
.. warning:: The factor :math:`\\hbar^{-1}` is not returned
and need to be included externally.
.. warning:: The factor :math:`\\hbar^{-1}` is not returned and need to be included externally.
"""

Expand Down
9 changes: 1 addition & 8 deletions src/t4me/lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,14 +825,7 @@ def create_kmesh( # pylint: disable=too-many-locals # noqa: MC0001
Notes
-----
This routines use spglib, an excellent tool written by A. Togo
: cite: `spglib`
.. rubric: : References
.. bibliography: : references.bib
: style: unsrt
: filter: docname in docnames
This routines use spglib, an excellent tool written by A. Togo.
"""

Expand Down
14 changes: 4 additions & 10 deletions src/t4me/lbtecoeff.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def parabolice(tr, eta, temperature, bs, tau0, method):

def parabolic_closed(tr, eta, bs, tau0_t, temperature): # pylint: disable=too-many-locals
r"""
Calculates the parabolic and parabolic Fermi integrals for the transport coefficients.
Calculates the parabolic Fermi integrals for the transport coefficients.
Parameters
----------
Expand Down Expand Up @@ -176,9 +176,9 @@ def parabolic_closed(tr, eta, bs, tau0_t, temperature): # pylint: disable=too-m
See Also
--------
setup_scattering()
find_r_from_tau0()
parabolic_numeric()
setup_scattering
find_r_from_tau0
parabolic_numeric
"""

Expand Down Expand Up @@ -427,12 +427,6 @@ def parabolic_numeric(tr, eta, bs, tau0_t, temperature): # pylint: disable=too-
.. todo:: ADD POSIBILITY TO USE DIFFERENT EFFECTIVE MASSES ALONG
DIFFERENT DIRECTIONS
.. rubric:: References
.. bibliography:: references.bib
:style: unsrt
:filter: docname in docnames
"""
# set logger
logger = logging.getLogger(sys._getframe().f_code.co_name) # pylint: disable=protected-access
Expand Down
16 changes: 2 additions & 14 deletions src/t4me/scattering.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@ def scattering_dos(tr, dos, energies, select_scattering): # pylint: disable=too
Only the acoustic phonon scattering has been tested.
Please consult the book of C. Jacoboni :cite:`jacoboni_2010_toetis` and the
publication concerning this software by
E. Flage-Larsen :cite:`t4me` for additional details
on the involved parameters. Also consult the bandstructure
Consult the bandstructure
configuration file for the respective constants that have to
be set besides `select_scattering` and their units.
Expand Down Expand Up @@ -477,22 +474,13 @@ def scattering_parabolic(tr, energies, select_scattering, use_eonk=False): # py
12 Constant (energy and k-point independent)
========================= ====================
Please consult the book of C. Jacoboni :cite:`jacoboni_2010_toetis` and the
publication concerning this software by
E. Flage-Larsen :cite:`t4me` for additional details
on the involved parameters. Also consult the bandstructure
Also consult the bandstructure
configuration file for the respective constants that have to
be set besides `select_scattering` and their units.
.. todo:: Add more extensive documentation for the different scattering
mechanisms.
.. rubric:: References
.. bibliography:: references.bib
:style: unsrt
:filter: docname in docnames
"""
# set logger
logger = logging.getLogger(sys._getframe().f_code.co_name) # pylint: disable=protected-access
Expand Down
7 changes: 4 additions & 3 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ def may_data():
data : ndarray
| Dimension: (11,5)
Contains the data from Table 11.1 in
Ref.:cite:`rowe_2012_mpacit_may`. With 11 entries
Contains the data from Table 11.1 in Andrew F. May and G. Jeffrey Snyder,
Introduction to Modelling Thermoelectric Transport at High Temperature,
Taylor \& Francis Inc, 2012, Chapter 11. With 11 entries
of different unitless chemical potentials (first index
of the second axis). The remaining 4 indexes of the
second axis contains the Seebeck coefficient, Lorenz
Expand All @@ -68,7 +69,7 @@ def may_data():
Fermi-Dirac integrals. The data given by may is converted to
a conduction band and thus the Seebeck should be
negative. Otherwise the values entered should be precicely the
same as in Ref.:cite:`rowe_2012_mpacit_may`.
same as in the reference given above.
"""
data = np.zeros((11, 5))
Expand Down

0 comments on commit a50f9bf

Please sign in to comment.