Assuming data has x,y or x,y,z co-ordinates, return data from a section of the parameter space.

Keyword Arguments

(DataFile) – A DataFile like object that includes only those lines from the original that match the section specification

Internally this function is calling to pull out matching sections of the data array. To extract a 2D section of the parameter space orthogonal to one axis you just specify a condition on that axis. Specifying conditions on two axes will return a line of points along the third axis. The final keyword parameter allows you to select data points that lie in an arbitary plane or line. eg:

d.section(r=lambda x,y,z:abs(2+3*x-2*y)<0.1 and z==2)

would extract points along the line 2y=3x+2 (note the use of an < operator to avoid floating point rounding errors) where the z-co-ordinate is 2.