Added a receptivefields function to clamp output and sample input.