crop_data¶
- pySurf.data2D.crop_data(data, x, y, xrange=None, yrange=None, zrange=None, mask=False, poly=None, interactive=False, *args, **kwargs)¶
Return data,x,y of cropped data inside axis ranges, polygons, or interactively selected rectangular region.
- axis ranges are passed as a 2-element vector of which each can be None
or None, where None indicates automatic range (adjust to data).
If mask is set to True, return a boolean mask of the cropped region. poly is a list of vertex for a polygon.
If interactive is True, allows interactive selection with: Zoom to the region to crop, and/or use CTRL+leftClick to add points and create an polygonal selection. CTRL+rightClick remove the nearest point. Press ENTER when done.