;+ ; NAME : current ; PURPOSE : ; calculate the electric current distribution based on ; vector magnetograms of the Solar Flare Telescope ; CATEGORY : ; lib/flare ; CALLING SEQUENCE : ; jz = current(bx,by,bin=bin) ; INPUTS : ; bx,by -- transversal mag. field in Gauss*10 ; OPTIONAL INPUT PARAMETERS : ; none ; KEYWORD PARAMETERS : ; bin -- binning factor ; OUTPUTS : ; COMMON BLOCKS : none ; SIDE EFFECTS : ; RESTRICTIONS : ; PROCEDURE : ; ; MODIFICATION HISTORY : ; K.Ichimoto '93/07/18 ;- function current,bx,by,bin=bin if not keyword_set(bin) then bin=1 s=size(bx) & nx=s(1) &ny=s(2) jz = convol(rebin(bx,nx/bin,ny/bin),[[-1,-4,-1],[0,0,0],[1,4,1]],12) $ +convol(rebin(by,nx/bin,ny/bin),[[1,0,-1],[4,0,-4],[1,0,-1]],12) return,jz end