projection

pySurf.data2D.projection(data, axis=0, span=False, expand=False)

return average along axis. default axis is 0, profile along x. keywords give extended results: span: if set, return 3 vectors [avg, min, max] with min and max calculated pointwise along same direction. expand: instead of a single vector with point-wise minima, returns lists of all vectors having at least one point

that is minimum (maximum) between all vectors parallel to axis. Overrides span.

ex: a=array([[21, 16, 3, 14],

[22, 17, 6, 15], [ 0, 3, 21, 16]])

In [62]: projection(a) Out[62]: array([ 14.33333333,12.,10.,15.])

In [73]: projection(a,span=True) Out[73]: [array([ 14.33333333,12.,10.,15.]),

array([ 0, 3, 3, 14]), array([22, 17, 21, 16])]

In [71]: projection(a,expand=True) Out[71]: [array([ 14.33333333,12.,10.,15.]),

array([[21, 16, 3, 14],[ 0, 3, 21, 16]]), array([[22, 17, 6, 15],[ 0, 3, 21, 16]])]