extract function

Extract a sub-sample of data