PRO spectrum,colors,HELP=help,ALL=all,BW=bw,DARKEST=darkest, $ GAMMA=gamma,SINUS=sinus,CUT=cut,TABLE=table, $ NCOLORS=ncolors,LIGHTEST=lightest PRINT,' [SPECTRUM] OBSOLETE - THIS ROUTINE SHOULD NO LONGER BE USED.' PRINT,' [SEPSTRUM] TERMINATING.' STOP IF KEYWORD_SET(help) THEN BEGIN PRINT,'This subroutine sets the coler table to a spectrum' PRINT,'PARAMETER:' PRINT,' HELP:' PRINT,' NE 0: print these lines' PRINT,' ALL:' PRINT,' NE 0: set also fore- and background color (default)' PRINT,' BW:' PRINT,' NE 0: make greyscale instead of color' RETURN ENDIF IF N_ELEMENTS(table) EQ 0 THEN table=1 IF N_ELEMENTS(all) EQ 0 THEN all=1 IF N_ELEMENTS(bw) EQ 0 THEN bw=0 IF N_ELEMENTS(darkest) EQ 0 THEN darkest=0.0D0 IF N_ELEMENTS(lightest) EQ 0 THEN darkest=1.0D0 IF N_ELEMENTS(gamma) EQ 0 THEN gamma=1.0D0 IF N_ELEMENTS(sinus) EQ 0 THEN sinus=0 IF N_ELEMENTS(cut) EQ 0 THEN cut=0 IF !D.N_COLORS LE 256 THEN BEGIN IF table THEN ncolors=!D.TABLE_SIZE ELSE ncolors=256 IF all NE 0 THEN BEGIN tvlct,255,255,255,ncolors-1 tvlct,0,0,0,0 ENDIF colors=indgen(ncolors) ENDIF ELSE BEGIN IF N_ELEMENTS(ncolors) EQ 0 THEN ncolors=256 colors=REPLICATE(0L,ncolors) colors(0)=RGB_GRAY(0) colors(ncolors-1)=RGB_GRAY(255) ENDELSE IF bw THEN BEGIN x=(darkest+(lightest-darkest)*(1.D0-DINDGEN(ncolors-2)/(1.D0*(ncolors-3)))^gamma)*255D0 IF !D.N_COLORS LE 256 THEN BEGIN TVLCT,x,x,x,1 ENDIF ELSE BEGIN colors(1:ncolors-2)=rgb_gray(x) ENDELSE ENDIF ELSE BEGIN ; TVLCT,/HSV,(1.0D0-FINDGEN(254)/254.0)*360.0,REPLICATE(1,254),REPLICATE(1,254),1 XS=0.2 XH=0.2 S=COS(DINDGEN(ncolors-2)/(ncolors-2)*!DPi*sinus)^2 H=COS(DINDGEN(ncolors-2)/(ncolors-2)*!DPi*sinus)^2 IF cut THEN BEGIN S=ROUND(S) H=ROUND(H) ENDIF S=1.0-XS+XS*S H=1.0-XH+XH*H ; V=(1.0D0-DINDGEN(ncolors-2)/(ncolors-2))*360.D0 V=(DINDGEN(ncolors-2)/(ncolors-2))*360.D0 IF !D.N_COLORS LE 256 THEN BEGIN TVLCT,/HSV,V,S,H,1 ENDIF ELSE BEGIN colors(1:ncolors-2)=HSV_COLOR(H,S,V) ENDELSE ENDELSE END