The triple-random constrainable curve generator for smooth function perturbation
Smurves is a highly customizable tool for random smooth curve generation, offering a more constrainable alternative to using, for example, Gaussian processes for that purpose. The method is based on modified Newtonian projectile motion and random sampling, and takes inspiration from Brandon Sanderson’s book series The Stormlight Archive. Specifically, this applies to the incorporation of changes in gravitational direction and magnitude for in-flight objects.
Given a user-specified set of very flexible constraints, the generator can be used in two ways to either create random functions with certain characteristics or perturb existing functions. For the first application, the generated curves can be directly used as random function instances, which is first introduced in our paper on the viability of type Ia supernovae for testing the standard model of cosmology. The second application treats the specified number of projectile location measurements as multiplicators for the values of a function that is to be smoothly perturbed, which is exemplified in our paper on emulating the non-linear matter power spectrum of alternative cosmologies.
Since Smurves is on PyPI, simply type
pip install smurves in your terminal to install it. This project was developed for Python 3, and the installation process will automatically install any necessary dependencies. Documentation and a quickstart guide on how to use Smurves can be found in the code repository as well as the source code’s docstrings.