pro  lwa_tic,x,y,res,bin,arcmin,color=color

;+
;   Name: lwa_tic
;
;   Calling sequence:
;	lwa_tic,x,y,res,bin,arcmin,color=color
;
;   Purpose: overplot bar scale on images
;
;       Procedure to place 1 arcmin bar scale on images.
;       x is rh end of bar in device coordinates
;       y is ver loc of bar in device coordinates
;       res is the on-chip sum (1, 2, or 4)
;       bin is the rebin factor
;       sh is the color to be used for the bar (0-255)
;       arcmin is the bar length in minutes of arc
;       L. Acton, Feb. 1992
;
;       Modified, slf 7-mar-92 to use plots (idl) instead of tvplot(user)
;	Added calling sequence to header.  LWA  20-May-95
;       16-aug-2015 - rename tic.pro -> lwa_tic.pro to avoid IDL intrinsic collision
;-


if not keyword_set(color) then color=255

if n_elements(bin) eq 0 then bin=1
if n_elements(res) eq 0 then res=1
if n_elements(arcmin) eq 0 then arcmin=1

size = (60*arcmin/(res*2.453))*bin
tic = (6*arcmin/(res*2.453))*bin

plots,[x,x+size],[y,y],color=color,/device
plots,[x,x],[y-tic,y+tic+2],color=color,/device
plots,[x+size,x+size],[y-tic,y+tic+2],color=color,/device

end
