if ( histfilenm eq ' ' ) then begin ;{
    ahdr=fltarr(8)
    ckey=bytarr(30)
    cpad=bytarr(2)
    histmap=fltarr(30,37)

    bigmap=fltarr(500,181)
    ;;window,2,xsize=900,ysize=700
endif ;}


    bigmap(*,*) = -9999.
    histfilenm='heightL/MK'+roti+'.L'+mlmb+'ib'
    close,1
    openr,1,histfilenm
	readu,1,ahdr
	readu,1,ckey
	readu,1,cpad
	readu,1,histmap
    close,1
    if( ahdr(4) eq 1.) then limb='    East limb'
    if( ahdr(4) eq 2.) then limb='    West limb'
    rot = string(format='("Carrington Rotation ",i5)',fix(ahdr(0)))
    bdate = string(format=$
    '("             Bdoy ",f6.2," 19",i2)',ahdr(2),fix(ahdr(1)))
    edate = string(format=$
    '("Edoy ",f6.2," 19",i2,"                ")',ahdr(3),fix(ahdr(1)))

    ahdr(7)=1.36  ;;; Diode 23
    print, ahdr(2),ahdr(3),ahdr(7)
    print,'ahdr',ahdr(*)
    print,'ckey',ckey(*)
    off1= 1.0-(ahdr(3)-fix(ahdr(3))) & offset=fix(off1 * 13)
    off1= (fix(ahdr(3))-fix(ahdr(2)))+ (1.0-(ahdr(2)-fix(ahdr(2))) )
    ned=fix(off1 * 13)

	    
    doy = 0  ; Have to skip doy=0 since the doy=0 vector is before
	     ; the image actually begins ( or map ends )
    for i=0,376,13 do begin ;{   One day is ~13 degrees...


	lat = 0
	    bigmap(i:i+12,0:2) = histmap(doy,lat)

	lat = lat + 1
	for j=3,181-4,5 do begin ;{
	    bigmap(i:i+12,j:j+4) = histmap(doy,lat)
	    lat = lat + 1
	endfor ;}

	    bigmap(i:i+12,178:180) = histmap(doy,lat)
	
	doy = doy +1
    endfor ;}
	bigmap(389:399,178:180) = histmap(doy,lat)


beemap=rebin(bigmap(0:399,0:179),80,36)
if( ahdr(4) eq 2.) then begin ;{ Flip west limb data
    waspmap = rotate(beemap,7)
    beemap = waspmap
endif;}
mymap=rebin(beemap(*,*),400,180)

lvl2= [ 12., 14., 16.]
clr2= [140,180,220]
lvl3= [ 2.]
clr3= [10]
lvl= [2.,     4.,  6.,  8.,  10., 12., 14., 16.]
mln= [1,      0,   2,   0,   2,   0,   0,    0]
mln= [1,      0,   0,   0,   0,   0,   0,    0]
thk= [1,      1,   2,   3,   4,  2,  2,   3]

myyticks=6
myytickv=findgen(7)*30
myxticks=29
myxtickv=findgen(30)*13
myxname=replicate('      X ',30)
for ii=0,myxticks do begin ;{
    if(ckey(ii) eq  48) then $
	myxname(ii) = string(format='(i8)',fix(ahdr(3))-ii)
endfor ;}
myyname=replicate(' ',19)
myyname(0)='-90'
myyname(6)=' 90'
myyname(3)='  0'

contour,mymap,/follow,levels=lvl,$
    c_linestyle=mln,$
    c_thick=thk,$
    xstyle=1,ystyle=1,zstyle=1,charsize=1.0,$
    xcharsize=0.6,$
    xtitle='DOY', ytitle='LATITUDE',$
    title=edate+rot+limb+bdate ,$
    subtitle='1.36 Rsun', $
    xtickname=myxname,$
    ytickname=myyname,$
    xticks=myxticks,xtickv=myxtickv, $
    yticks=myyticks,ytickv=myytickv, $
    ticklen= -0.015 , xmargin=[10,10] , ymargin=[4,4]

contour,mymap,/follow,levels=lvl2,c_color=clr2,overplot=1,fill=1
;;;;contour,mymap,/follow,levels=lvl3,c_color=clr3,overplot=1,fill=1

    oplot,[offset,offset],[0,180],thick=2
    oplot,[ned,ned],[0,180],thick=2
    oplot,[offset,ned],[90,90],thick=2

end
