pro first_over

;+
; PURPOSE
;   Simple program to "improve" the FIRST_LIGHT color table.
; CALLING SEQUENCE
;   first_over
; EXPLANATION
;   For those of you who object to the Stern Special color
;   table for FIRST_LIGHT. I've written and put on line a
;   routine called FIRST_OVER to run after first light to
;   reverse the color table of the SXT FFI images and return
;   the B&W color table.  Run it again and it reverses
;   the reversed images.  Then loadct,15 to get back where you
;   started.
; HISTORY
;   30-Oct-94  Written by Acton and improved by Slater.
;    1-nov-94  (SLF) protect against crash on small screen monitors or
;                    if current window ne first_light window
;-

 if !d.y_size lt 768 then begin
    tbeep
    message,/info,"Current window not first_light window, returning..."
    return
 endif

 ybig=!d.y_size-511
 ysmall=ybig-257 > 0
 big=tvrd(0,ybig,512,511)
 BIG = MAX(BIG) - BIG          ; Slater's improvement
 tvscl,big,0,ybig
 small = tvrd(0,ysmall,256,255)
 SMALL = MAX(SMALL) - SMALL    ; Slater's improvement
 tvscl,small,0,ysmall
 loadct,0

end

