Skip to content
External Curves

External Curves

Fit curves are normally defined using built-in functions. It is also possible to create a curve computed by an external program.

Creating an external curve

Use the command:

> cca h

for up-to-date information on all available modes. The h argument prints help; replace it with one of the codes below to create the curve.

Evaluation modes

Combine one parameter mode letter with one x-grid mode letter:

Code Meaning
c External program reads parameters from the command line
i External program reads parameters from stdin (first line: count; then one per line)
r External program reads x values from stdin (after parameters, if any); expects one line with count, then one x per line
w External program sets its own x grid; Frida interpolates

Combined codes: ecr, eir, ecw, eiw.

Example:

> cca ecr          # external curve: parameters from command line, x values from stdin

Frida then prompts for the name of the external program and the number of parameters.

External program interface

The external program must output lines containing data pairs:

x y

one pair per line. Frida reads these and uses them as the curve values, interpolating if necessary (mode w).