function [H, delta] = pimg_step(x, R, dx)
	% [H, delta] = pimg_step(x, R, dx)
	% evaluate the step function H((x-R)/dx)
	% and the delta function delta((x-R)/dx)
	% for discretising a sharp particle image
	%
	% numerically, this is implemented as 

	if nargin < 3
		dx = 1;
	end

	H			= min(1, max(0, (x-R)/dx+0.5));
	if nargout > 1
		delta	= (H ~=0 & H ~= 1) / dx;
	end
end