KermitPNGFile.section¶
- KermitPNGFile.section(**kargs)¶
Assuming data has x,y or x,y,z co-ordinates, return data from a section of the parameter space.
- Keyword Arguments
x (float, tuple, list or callable) – x values ,atch this condition are included inth e section
y (float, tuple, list or callable) – y values ,atch this condition are included inth e section
z (float, tuple,list or callable) – z values ,atch this condition are included inth e section
r (callable) – a
tuple (function that takes a) –
- Returns
(DataFile) – A
DataFile
like object that includes only those lines from the original that match the section specification
Internally this function is calling
DataFile.search()
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.