Skip to content

Latest commit

 

History

History
153 lines (114 loc) · 3.57 KB

DEFINITIONS.md

File metadata and controls

153 lines (114 loc) · 3.57 KB

tr-A_dependence_plots

Data definitions


Plot:

single curve defined by a 4-tuple.
Unfortunately the use of the word "plot" here is kind of subtle, as it is more commonly attributed to a visual figure, while I use it to describe a particular curve independent of a figure. The extent of my creativity has its limits.

Form:
(x_array, y_array, const_list, const_dict)
  • x_array: ordered numpy array specifying the values of the independent variable
  • y_array: ordered numpy array specifying the values of the depenent variable (same length as x_array)
  • const_list: ordered list of constants related to the particular curve
  • const_dict: dictionary of named constants related to the particular curve

Plot transform:

(aka transform) callable object that performs a transformation on a curve or plot.
See transforms.py.

Form:
t(x_array, y_array, *args) -> (next_x, next_y, *args)
  • x_array: (see plot definition)
  • y_array: (see plot definition)
  • next_x: transformed x array
  • next_y: transformed y array
  • *args: other arguments, which are unchanged by the transformation (but may be referenced by the transformation).
Using with plot:

The inclusion of args is particularly convenient for working with a plot.

transformed_plot = t(*plot)

Alternatively, a transform could be used independently of a plot, as long as args is not referenced by the transform.

Composition:

Another benefit of the above definition is that a series of transform can be composed. For example, one might with to apply t1 and then t2 to a plot.
This may be done manually:

next_plot = t2(*t1(*plot))

Or it may be done using compose_transforms from transforms.py:

from transforms import compose_transforms
t_comp = compose_transforms([t2, t1])
next_plot = t_comp(*plot)

Plot super transform:

(aka super transform) callable object that performs a transformation on a list of plot. This is a generalization of plot transform. See transforms_s.py.

Form:
st(list_of_plot) -> next_list_of_plot
  • list_of_plot: list of plot
  • next_list_of_plot: transformed list of plot
Composition:

A series of super transform may be composed. For example, one might wish to apply st1 and then st2 to a list_of_plot.
This may be done manually:

next_list_of_plot = st2(st1(list_of_plot))

Or it may be done using compose_super_transforms from transforms.py:

from transforms_s import compose_super_transforms
st_comp = compose_super_transforms([st2, st1])
next_list_of_plot = st_comp(list_of_plot)

Fit function:

(aka fitfn, FitFunction) callable object used for fitting.
See FitFunction.py.

Form:
f(x, params, const_list, const_dict) -> y
  • x: value of the independent variable; a real number
  • params: list of parameters the functional form of the fit depends on (to be optimized)
  • const_list: (see plot definition)
  • const_dict: (see plot definition)
  • y: value of the dependent variable (the fit); a real number

A fit function f has the field f.num_fit_params, which gives the number of fit parameters necessary to evaluate the function.

Dependence on a constant:

Coming soon.

Combination:

Coming soon.

Exp:

Coming soon.

DataMap:

See DataMap.py. Coming soon.

Datum:

See Datum.py Coming soon.

Metafitter:

See metafit.py Coming soon.