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.

An E of 3 lines.

examplecurves API-reference

examplecurves.Static.create(family_name[, …])

Creates static families of curves requested by name.

families of curves

examplecurves.NonLinear0(*args, **kwargs)

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.

HorizontalLinear0

(Source code, png, hires.png, pdf)

_images/HorizontalLinear-1.png

HorizontalLinear1

(Source code, png, hires.png, pdf)

_images/HorizontalLinear-2.png

HorizontalLinear2

(Source code, png, hires.png, pdf)

_images/HorizontalLinear-3.png

HorizontalLinear3

(Source code, png, hires.png, pdf)

_images/HorizontalLinear-4.png

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.

DiagonalLinear0

(Source code, png, hires.png, pdf)

_images/DiagonalLinear-1.png

DiagonalLinear1

(Source code, png, hires.png, pdf)

_images/DiagonalLinear-2.png

DiagonalLinear2

(Source code, png, hires.png, pdf)

_images/DiagonalLinear-3.png

DiagonalLinear3

(Source code, png, hires.png, pdf)

_images/DiagonalLinear-4.png

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.

VerticalLinear0

(Source code, png, hires.png, pdf)

_images/VerticalLinear-1.png

VerticalLinear1

(Source code, png, hires.png, pdf)

_images/VerticalLinear-2.png

VerticalLinear2

(Source code, png, hires.png, pdf)

_images/VerticalLinear-3.png

VerticalLinear3

(Source code, png, hires.png, pdf)

_images/VerticalLinear-4.png

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)

_images/index-1.png

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)

_images/index-2.png

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)

_images/index-3.png

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)

_images/index-4.png

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)

_images/index-5.png

Indices and tables