Create a documentation page(s) that show parameter values and figures for all bicycles and riders
The idea would be to display all the parameter output values for bicycle and bicycles+riders and show the standard geometry and eigenvalue plots. This would then be an easy place to get info and numerical values for downstream use (without having to run the software).
sphinx-gallery might be a better choice than the matplotlib directive, as the latter can't display text output of a cell and we could make one file/page per bicycle.
I made this script for the balance assist bike and it would be nice to output similar info for all the other bikes:
import pprint
import numpy as np
import matplotlib.pyplot as plt
import bicycleparameters as bp
from bicycleparameters.parameter_sets import Meijaard2007ParameterSet
from bicycleparameters.models import Meijaard2007Model
data_dir = "/home/moorepants/Data/bicycle-parameters"
v = np.linspace(0.0, 10.0, num=401)
bicycle = bp.Bicycle("Balanceassistv1", pathToData=data_dir,
forcePeriodCalc=True, forceRawCalc=True)
bicycle.save_parameters()
print(bicycle)
print('Bicycle short name:', bicycle.bicycleName)
print('Directory:', bicycle.directory)
pprint.pprint(bicycle.extras)
M, C1, K0, K2 = bicycle.canonical()
print('M:', M)
print('C1:', C1)
print('K0:', K0)
print('k2:', K2)
A, B = bicycle.state_space(3.2)
print('A:', A)
print('B:', B)
print(*bicycle.eig([1.0, 2.0]))
bicycle.plot_bicycle_geometry(show=False)
bicycle.plot_eigenvalues_vs_speed(v)
par = bp.io.remove_uncertainties(bicycle.parameters['Benchmark'])
par['v'] = 1.0
pprint.pprint(par)
par_set = Meijaard2007ParameterSet(par, False)
par_set.plot_all()
model = Meijaard2007Model(par_set)
model.plot_eigenvalue_parts(v=v)
bicycle.add_rider('Jason', reCalc=True)
bicycle.save_parameters()
print(bicycle)
bicycle.plot_bicycle_geometry(show=False)
par = bp.io.remove_uncertainties(bicycle.parameters['Benchmark'])
par['v'] = 1.0
pprint.pprint(par)
par_set = Meijaard2007ParameterSet(par, True)
par_set.plot_all()
model = Meijaard2007Model(par_set)
model.plot_eigenvalue_parts(v=v)
plt.show()
This is good enough to be merged. The old examples can be made into new gallery examples in future PRs.