Skip to content
✨ SymPy Power! 🚀

In this big new point release most of PARMESAN's functions are rewritten in terms of SymPy (https://sympy.org) equations. A sophisticated new decorator ``@from_sympy`` then turns these equations into functions that behave like typical PARMESAN functions do, but they can do even more and have other benefits:

* Functions now have **unified argument names** in terms of ``parmesan.symbols``. This means that every function depending on potential temperature will accept *exactly* the same argument name for potential temperature.
* Functions now accept any **alias** of symbols used in its expression (e.g. both ``T`` and ``temperature``)
* Documentation (parameters, units, bounds, LaTeX formulas, etc. ) is now entirely auto-generated. This reduces the amount of boilerplate code for PARMESAN functions *immensely*. A full-featured PARMESAN function (units check, bounds check, auto-generated documentation, alias matching, etc.) can now be as short as *three lines* (decorator, function name and single-line SymPy expression). As you can imagine, this is a massive improvement for maintainability and code readability. The documentation will also contain less (human-style) errors such as copy-paste failures or missed parameter descriptions.
* Functions now have an *auto-generated* **maximum error sensitivity analysis** attached. This means if you want to know how uncertainties in your input values reflect in the result, you can use the ``my_function.equation`` attribute and it'll contain an executable function to calculate this. The documentation also explains the usage and displays the underlying equation.

Other Improvements:

Apart from those technical changes, PARMESAN now also features:

* several stability and flux functions.
* density functions
* a ``covariances()`` function to calculate running covariances, e.g.  for eddy covariance analysis
* a ``quicklook()`` function to get a quick overview plot over a timeseries
* an ``autocorrelation()`` plot
* a proper ``variance_spectrum()`` function (deprecates `power_spectrum``) that fulfills Parseval's Theorem by default
* poetry as build system
* ... probably more 🙂

Backwards-Compatibility:

As this is a major point release, expect some breakages, although minor.  Some functions were renamed slightly and the exact parameter names have been unified in terms of those in ``parmesan.symbols``. Search the documentation for the correct usage in case you encounter such errors.