cite

sbpy.bib.cite(citations)[source]

Decorator that registers citations within sbpy.

This decorator is the primary mechanism for registering citations. As an alternative, register may be called directly.

Parameters:
citationsdict

A dictionary of NASA Astrophysics Data System (ADS) bibcodes, DOIs, or free-form strings to cite. The key references the aspect that requires citation, e.g., {'method': '1998Icar..131..291H'}, or {'parameter : beaming': '2013Icar..226.1138F'}.

Returns:
decoratorfunction

Function decorator.

Examples

>>> @cite({'method': '1687pnpm.book.....N'})
... def force(mass, acceleration):
...     return mass * acceleration
>>>
>>> with Tracking(to_text):
...     print(force(1, 2))    
2
sbpy:
  software: sbpy:
      Mommert, Kelley, de Val-Borro, Li et al. 2019, The Journal of Open Source Software, Vol 4, 38, 1426
sbpy.bib.core.force:
  method:
      Newton 1687, Philosophiae Naturalis Principia Mathematica. Auctore Js. Newton