pro geppou_color,manual=manual ;+ ; NAME : geppou_color ; ; PURPOSE : to load a color table for publication in Tenmon Geppou ; (only with the cyan and key colors) ; ; USE : IDL> geppou_color ; IDL> geppou_color,/m ; ; INPUTS : None ; ; OUTPUTS : None ; ; OPTION : manual = to adjust colors (256 patterns) ; 1. click the left button and drag the cursor on the IDL window ; 2. click the right button to finish the adjustment ; ; VERSION : 1.0 Written, 2011 Nov 30 ; ; CREDIT : Takenori Joten OKAMOTO (joten.okamoto@nao.ac.jp) ;- if keyword_set(manual) eq 0 then begin ; pp=19 r=intarr(256) g=r r[105:255]=[1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 6, 7, 7, 8, 9, 10, 12, 13, $ 14, 15, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 33, 35, 37, 39, $ 41, 43, 44, 46, 48, 50, 52, 54, 55, 57, 59, 61, 63, 65, 67, 70, $ 71, 73, 75, 77, 79, 81, 83, 85, 86, 88, 90, 92, 94, 96, 98, 100, $ 101, 103, 105, 107, 109, 111, 113, 115, 116, 118, 120, 122, 124, $ 126, 128, 130, 132, 133, 135, 137, 139, 141, 143, 145, 147, 148, $ 150, 152, 154, 156, 158, 160, 162, 163, 165, 167, 169, 171, 173, $ 175, 177, 178, 180, 182, 184, 186, 188, 190, 192, 194, 195, 197, $ 199, 201, 203, 205, 207, 209, 210, 212, 214, 216, 218, 220, 222, $ 224, 225, 227, 229, 231, 233, 235, 237, 239, 241, 242, 244, 246, $ 248, 250, 252, 254] g[0:156]=[0, 1, 3, 5, 7, 9, 11, 13, 14, 16, 18, 20, 22, 24, 26, 28, 30, 31, $ 33, 35, 37, 39, 41, 43, 45, 46, 48, 50, 52, 54, 56, 58, 60, 61, 63, $ 65, 67, 69, 71, 73, 75, 77, 78, 80, 82, 84, 86, 88, 90, 92, 93, 95, $ 97, 99, 101, 103, 105, 107, 108, 110, 112, 114, 116, 118, 120, 122, $ 123, 125, 127, 129, 131, 133, 135, 137, 139, 140, 142, 144, 146, $ 148, 150, 152, 154, 155, 157, 159, 161, 163, 165, 167, 169, 170, $ 172, 174, 176, 178, 180, 182, 184, 185, 187, 189, 191, 193, 195, $ 197, 199, 200, 202, 204, 206, 208, 210, 211, 213, 215, 217, 218, $ 220, 222, 224, 225, 227, 228, 230, 231, 233, 234, 236, 238, 239, $ 240, 241, 243, 244, 245, 246, 246, 247, 248, 249, 249, 250, 251, $ 251, 251, 252, 252, 253, 253, 253, 253, 254, 254, 254, 254, 254] g[157:255]=255 b=g tvlct,r,g,b endif else begin corx=intarr(256,256) cory=corx corx[0:127,0]=0 corx[128:255,0]=indgen(128)*2 cory[0:127,0]=indgen(128)*2 cory[128:255,0]=255 for pp=1,128 do begin p=pp*1.0 q=255.-p yy=findgen(q*100.)/100.0 x=(yy/(q/p^(p/q)))^(q/p) s=0 for jj=0,n_elements(yy)-2 do s=s+total(sqrt(1.e-4+(x[jj]-x[jj+1])^2)) corx[128,pp]=pp cory[128,pp]=q l=0 count=1 for jj=n_elements(yy)-1,1,-1 do begin l=l+sqrt(1.e-4+(x[jj]-x[jj-1])^2) if l ge s/128*count then begin corx[128-count,pp]=x[jj-1] cory[128-count,pp]=yy[jj-1] count++ endif endfor for jj=129,255 do begin corx[jj,pp]=255-cory[256-jj,pp] cory[jj,pp]=255-corx[256-jj,pp] endfor endfor for pp=129,255 do begin corx[*,pp]=cory[*,256-pp] cory[*,pp]=corx[*,256-pp] endfor window,xs=390,ys=256,/free pp=128 repeat begin r=intarr(256) g=indgen(256) b=g for ii=255,0,-1 do begin r[*]=findgen(256)/256.0*(256.0-ii) tvlct,r,g,b tvscl,indgen(1,256),255-ii,0 endfor loadct,3,/silent for jj=0,255 do plots,[corx[jj,pp],corx[jj,pp]],[cory[jj,pp],cory[jj,pp]],$ /dev,color=150,psym=3 g=cory[*,pp] b=g r=fix(corx[*,pp]*1.0*cory[*,pp]/255) tvlct,r,g,b tvscl,findgen(128,256),262,0 aaa:cursor,ppp,qq,/wait,/dev if !ERR eq 4 then goto,bbb if ppp eq pp then goto,aaa bbb:pp=ppp pp=pp<255>0 endrep until !ERR eq 4 endelse print,'% Cyan + Key colors for tenmon-geppou (The Astronomical Herald)' end