Welcome to examplecurves’s documentation!¶
examplecurves is a module outsourced from arithmeticmeancurves. Its main purpose is to provide exemplary, reproducible families of curves for testing and debugging purposes.
examplecurves API-reference¶
|
Creates static families of curves requested by name. |
families of curves¶
|
5 non linear curves with a light curvature. |
Group of Horizontal Linear¶
Each family of curves of the group horizontal linear is a standard normal choice of 5 static linear curves. Their end points are horizontally aligned, based on the assumption of a strength fail criterion. Current members are index are indexed by 0 to 3.
Group of Diagonal Linear¶
Each family of curves of the group horizontal linear is a standard normal choice of 5 static linear curves. Their end points are diagonally aligned, based on the assumption of an energy fail criterion. Current members are index are indexed by 0 to 3.
Group of Vertical Linear¶
Each family of curves of the group vertical linear is a standard normal choice of 5 static linear curves. Their end points are vertically aligned, based on the assumption of a strain fail criterion. Current members are index are indexed by 0 to 3.
Installation¶
$ pip install examplecurves
Basic Usage¶
Using examplecurves.create()
is the default way to get example curves.
The necessary argument is the family_name of the family of curves, which are listed
in the api-reference of this documentation.
import examplecurves
requested_curves = examplecurves.Static.create("nonlinear0")
examplecurves.plot_curves(requested_curves)
(Source code, png, hires.png, pdf)

It is possible to make a selection of the returned curves by the curves indexes. By curve_selection a list of indexes defines the curves to be returned only.
import examplecurves
requested_curves = examplecurves.Static.create("nonlinear0", curve_selection=[0,2,4])
examplecurves.plot_curves(requested_curves)
(Source code, png, hires.png, pdf)

Cutting of curves is also possible by either defining the index (integer position within a sequence) or list of maximum 3 entries defining a slice. [None, -3] would lead to slicing the curves like curve[:-3]. The default behavior of providing an integer only is equivalent to `curve[:i].
import examplecurves
requested_curves = examplecurves.Static.create(
family_name="nonlinear0",
cut_curves_at=3,
curve_selection=[0,2,4]
)
examplecurves.plot_curves(requested_curves)
(Source code, png, hires.png, pdf)

The requested curves can be offset by an iterable of custom offsets.
import examplecurves
requested_curves = examplecurves.Static.create(
family_name="nonlinear0",
cut_curves_at=3,
offsets=[(1, 2), (3, 4), (5, 6)],
curve_selection=[0,2,4]
)
examplecurves.plot_curves(requested_curves)
(Source code, png, hires.png, pdf)

The examplecurves might come with predefined offsets, which can be invoked by predefined_offset defining the index of the offset. predefined_offset overrules offsets.
import examplecurves
requested_curves = examplecurves.Static.create(
family_name="nonlinear0",
cut_curves_at=3,
offsets=[(1, 2), (3, 4), (5, 6)],
predefined_offset=1,
curve_selection=[0,2,4]
)
examplecurves.plot_curves(requested_curves)
(Source code, png, hires.png, pdf)
