function pix2v4,xin,yin,hdrin,heliographic=heliographic,solar=solar,radius=radius
if keyword_set(heliographic) then mode='HELIOGRAPHIC' else mode='SRS'
rok = isvalid(radius)

if not isvalid(hdrin) and data_chk(yin,/struct) then begin
    if(nlm(xin) eq 2) then begin
        y = xin(1)
        x = xin(0)
    end else if((size(x))(0) eq 2) then begin
        y=xin(*,1)
        x=xin(*,0)
    end else message,"Unrecognized arguments!"
    hdr = yin
end else begin
    x = xin
    y = yin
    hdr = hdrin
end


;;
;; Shortcut for alternate coordinate systems:  Longitude/latitude 
;; implies heliographic coordinates.
;;
if(strpos(hdr(0).CTYPE1,'degrees-longitude') ne -1) then begin
    if not isvalid(radius) then radius=1.0d0

    if(strpos(hdr(0).CTYPE2,'sine') ne -1) then     $
        y1=asin(y)*!radeg else          $
        y1 = y

    out = v4canon(hdr.DATE_OBS+' '+hdr.TIME_OBS,x,y1,radius $
        ,'timestamp','degrees-longitude','degrees-latitude','solar-radii' $
        ,'heliographic',[1,1,1,1])
end else begin
    if not isvalid(radius) then radius=1.0d0*(mode eq 'HELIOGRAPHIC')
    if (nlm(hdr) eq 1) then begin
        xyo = zcoord(x,y,hdr,/tosolar,/arcmin)
    end else begin
        xyo = dblarr(nlm(x),2)
        for i=0,nlm(x)-1 do xyo(i,*) = zcoord(x(i),y(i),hdr(i),/tosolar,/arcmin)
    end
    
    out = v4canon(v4(hdr.DATE_OBS+' '+hdr.TIME_OBS,xyo(*,0),xyo(*,1),radius,$
        'timestamp','arcmin','arcmin','solar-radii',"srs",[1,1,1,rok]))
end

if(mode ne 'SRS') then out = v4xform(out,mode)
return,out
end