pro funct_wrap, x, a, f, pder, amp=amp
;
;
;inputs:
;	x
;	a	- coefficients
;outputs:
;	f	- the function
;optional outputs:
;	pder	- the partial derivative
;
;-
;
if (n_elements(amp) eq 0) then begin
    message, 'Using 400 as the amplitude', /info
    amp = 400
end
;
f = ( (x-a(1)) mod a(0) ) * amp/a(0)
;
n = n_elements(x)

if n_params() gt 2 then begin
    pder = fltarr(n, 2)
    pder(*,0) = x
    pder(*,1) = -1
end
;
end
