Viewing contents of file '../idllib/astron/contrib/varosi/code/allpro/display_all.pro'
;+
; NAME:
; Display_ALL
; PURPOSE:
; For the MODION widget:
; Display all energy levels, transitions and axes in draw widget windows.
; Usually called by pro Draw_Axes_Set_V of CW_Draw_Axes widget,
; when value is set by the Modion widget.
; Assumes that the draw widget windows are already erased.
; CALLING:
; Display_ALL, widgst
; INPUTS:
; widgst = structure, state and info of CW_Draw_Axes widget.
;
; and variables in common blocks.
; OUTPUTS:
; None.
; COMMON BLOCKS:
; common modion_Widget, modion_widget
; and see file: ~/modion/code/modion_common.pro
; EXTERNAL CALLS:
; pro Display_ELevs
; pro Display_Trans
; pro Display_SupLevs
; function N_struct
; PROCEDURE:
; Straightforward.
; HISTORY:
; Written: Frank Varosi NASA/GSFC 1994.
; Mod: F.V. 1995, added call to Display_SupLevs.
;-
pro Display_ALL, widgst
@modion_common
common modion_Widget, modion_widget
on_error,2
save_win = !D.window
reducf = modion_widget.Zoomf / modion_widget.Zfmax
wset, widgst.draw.window
Display_Trans, BB_Trans, ZOOM=reducf
if (modion_widget.Line_supLevs) then begin
Display_ELevs, ELevs, ZOOM=reducf
Display_SupLevs, SupLevs, ZOOM=reducf
endif else begin
Display_SupLevs, SupLevs, ZOOM=reducf
Display_ELevs, ELevs, ZOOM=reducf
endelse
nslp = N_struct( L_axis )
neax = N_struct( E_axis )
if (nslp LE 0) OR (neax LE 0) then begin
if (save_win GE 0) then wset, save_win
return
endif
wset, widgst.xaxis.window
Locy = widgst.xaxis.size(1) - 2 * !D.y_ch_size
Locx = L_axis.Loc * reducf(0)
if (nslp/modion_widget.Zoomf(0) GT 9) then cfont=0 else cfont=-1
Lval = L_axis.Val
if (nslp/modion_widget.Zoomf(0) GT 19) then begin
Lval( where( strpos( Lval, "o" ) GT 0 ) ) = ""
Lval = strmid( Lval, 0, 2 )
endif
for i=0,nslp-1 do xyouts,/DEV, Locx(i), Locy, Lval(i), SIZE=2,FONT=cfont
wset, widgst.yaxis.window
Locx = widgst.yaxis.size(0) - !D.x_ch_size
Locy = ( E_axis.Loc * reducf(1) ) - (!D.y_ch_size/1.5)
CASE round( modion_widget.Zoomf(1) * 50./neax ) > 1 OF
1: eskip = 10
2: eskip = 5
3: eskip = 2
else: eskip = 1
ENDCASE
for i = 0, neax-1, eskip do $
xyouts,/DEV, Locx, Locy(i), E_axis(i).Val, ALIGN=1, SIZE=2
if (save_win GE 0) then wset, save_win
end