Next: , Previous: , Up: Internal Routines   [Contents][Index]


15.5.42 bisect

bisect([x,] y, values [, axis=axis, pos=pos, width=width])

Calculates bisector positions in curves interpolated between data points with coordinates (x,y), along the indicated axis (which, if specified, must be a single scalar) at the indicated values. The x coordinates must be in ascending order, with one value for each value of y along the indicated axis. Interpolation is done with natural cubic splines. Here, a bisector is a curve that lies horizontally midway between two branches straddling a local minimum of a curve.

If axis is not specified, then the data is treated as if it is a one-dimensional array.

If pos is specified, then it must have a single element, which indicates at what coordinate along the indicated axis the search for the bisectors must begin. This is useful if a horizontal line at the desired level intersects a curve from (x,y) in more than two places, which means that there are at least two bisectors: By specifying pos you can select which bisector to look for. If no pos is specified, then the search for the bisector is started at the location of the absolute minimum.

If width is specified, then the profile widths (the distance between the two branches) corresponding to the bisector level are returned in it.

Note: Bisectors are only sought between the data values: no bisectors are found before the first or after the last element of each treated profile. If no bisector is found at the sought level, then -1 is returned for the bisector position and 0 for the bisector width.

See also: cspline, Interpolation


Next: , Previous: , Up: Internal Routines   [Contents][Index]