Citations#
- class pybamm.Citations[source]#
Entry point to citations management. This object may be used to record BibTeX citation information and then register that a particular citation is relevant for a particular simulation.
Citations listed in pybamm/CITATIONS.txt can be registered with their citation key. For all other works provide a BibTeX Citation to
register().Examples
>>> import pybamm >>> pybamm.citations.register("Sulzer2021") >>> pybamm.citations.register("@misc{Newton1687, title={Mathematical...}}") >>> pybamm.print_citations("citations.txt")
- print(filename=None, output_format='text', verbose=False)[source]#
Print all citations that were used for running simulations. The verbose option is provided to print the citation tags for the citations that have been registered non-manually. This is available only upon printing to the terminal.
- read_citations()[source]#
Reads the citations in pybamm.CITATIONS.txt. Other works can be cited by passing a BibTeX citation to
register().
- register(key)[source]#
Register a paper to be cited. The intended use is that
register()should be called only when the referenced functionality is actually being used.Warning
Registering a BibTeX citation, with the same key as an existing citation, will overwrite the current citation.
- Parameters:
key (str) –
The citation key for an entry in pybamm/CITATIONS.txt or
One or more BibTeX formatted citations
- tag_citations()[source]#
Prints the citations tags for the citations that have been registered (non-manually). This is used for verbose output when printing citations such that it can be seen which citations were registered by PyBaMM classes.
To use, either call
tag_citations()after callingregister()for all citations, or enable verbose output withprint_citations()orprint().Note
If a citation is registered manually, it will not be tagged.
Examples
1pybamm.citations.register("Doyle1993") 2pybamm.citations.print() or pybamm.print_citations()
will print the following:
Citations registered: Sulzer2021 was cited due to the use of pybamm.models.full_battery_models.lithium_ion.dfn