function V4XHEL2CARR,in,verbose=v,index=ix,outdex=ox,ocoords=ocoords ;;; ;;; Check out input keywords for existence... ;;; if not isvalid(ix) then ix=[0,1,2,3] if not isvalid(ox) then ox=[0,1,2,3] v = keyword_set(v) iu = ix+5 ou = ox+5 ;;; ;;; Convert to degrees, in a spare copy of the input... i2 = in out= in zu = zunits("degrees",i2.(iu(1))) i2.(ix(1)) = i2.(ix(1)) * zu i2.(iu(1)) = "degrees" if (zu eq 0) then message,"V4xhel2carr: Non-angular longitude!" ;;; ;;; Copy the non-transformed co-ordinates and, if desired, the coords keyword out.(ox(0)) = in.(ix(0)) out.(ox(2)) = in.(ix(2)) out.(ox(3)) = in.(ix(3)) out.(ou(0)) = in.(iu(0)) out.(ou(2)) = in.(iu(2)) out.(ou(3)) = in.(iu(3)) if isvalid(ocoords) then out.coords=ocoords ;;; ;;; Do the actual transformation... if nlm( (out.(ox(1)))) gt 1 then begin out.(ox(1)) = tim2carr(in.(ix(0)),offset=in.(ix(1))) end else begin out.(ox(1)) = (tim2carr(in.(ix(0)),offset=in.(ix(1))))(0) end return,out end