create

examplecurves.Static.create(family_name: str, cut_curves_at: Optional[Union[int, List[int]]] = None, offsets: Optional[Union[Iterable[float], Iterable[Tuple[float, float]]]] = None, predefined_offset: Optional[int] = None, curve_selection: Optional[List[int]] = None) → List[pandas.core.frame.DataFrame]

Creates static families of curves requested by name.

Parameters
  • family_name – Name of the family of curves.

  • cut_curves_at (Optional[Union[int, List[Optional[int]]]]) – Cuts the curves at an integer position, os slices it by 2 or 3 entries, where ‘None’ is a blank. Like [None, -3] being [:-3].

  • offsets (Optional[Union[Iterable[float], Iterable[Tuple[float, float]]]]) – Offsets to apply to the group’s curves. Provide either abzissa offsets as a 1-dimensial array or absizza and ordinate offsets as a 2-dimensional array.

  • predefined_offset (Optional[int]) – Index of the group’s predefined offsets to use. Overrules offsets.

  • curve_selection (Optional[List[int]]) – Number (0 .. n-1) of the curves, which should be actually be created.

Returns

List[DataFrame]

Examples

>>> import examplecurves
>>> from doctestprinter import doctest_iter_print, doctest_print
>>> sample_curves = examplecurves.Static.create(
...     family_name="nonlinear0", cut_curves_at=[2, 8, 2]
... )
>>> doctest_iter_print(sample_curves)
         y
x
0.23  2.70
0.46  4.95
0.69  6.75
       y
x
0.2  3.0
0.4  5.5
0.6  7.5
              y
x
0.222  3.085479
0.444  5.651643
0.666  7.698492
           y
x
0.192  3.450
0.384  6.325
0.576  8.625
          y
x
0.18  3.450
0.36  6.325
0.54  8.625
>>> sample_curves = examplecurves.Static.create(
...     family_name="nonlinear0",
...     cut_curves_at=[2, 4],
...     predefined_offset=1,
...     curve_selection=[1]
... )
>>> doctest_print(sample_curves[0])
           y
x
0.28  3.0100
0.38  4.3225