Viewing contents of file '../idllib/astron/contrib/varosi/code/allpro/display_trans.pro'
;+
; NAME:
; Display_Trans
; PURPOSE:
; Display the allowed transitions between energy levels as selected.
; CALLING:
; Display_Trans, Trans
; INPUTS:
; Trans = array of structures with fields for graphics device Location of
; transitions between energy levels.
; KEYWORDS:
; ZOOM_FACTOR = magnification (default=1) to be applied to:
; both x & y axes if one number is specified, or
; x & y axes respectively if two numbers are specified.
; PANXY = two numbers specifying x & y translation in device coordinates,
; default = [0,0].
; OUTPUTS:
; None.
; EXTERNAL CALLS:
; function N_struct
; PROCEDURE:
; HISTORY:
; Written: Frank Varosi NASA/GSFC 1994.
;-
pro Display_Trans, Trans, ZOOM_FACTOR=zoomf, PANXY=panxy
on_error,2
if N_struct( Trans ) LE 0 then return
w = where( Trans.allowed AND (Trans.LineThick GT 0), nw )
if (nw LE 0) then return
Linexy = [ Trans(w).Loci, Trans(w).Locj ]
CASE N_elements( zoomf ) OF
1: Linexy = temporary( Linexy ) * zoomf
2: Linexy = temporary( Linexy )*( [zoomf,zoomf] # replicate(1,nw) )
else:
ENDCASE
if N_elements( panxy ) EQ 2 then $
Linexy = temporary( Linexy ) + [ panxy, panxy ] # replicate( 1,nw )
Linexy = reform( Linexy>0, 2, 2, nw, /OVER )
cols = Trans(w).color
Lstyle = Trans(w).LineStyle
Lthick = Trans(w).LineThick
for i=0,nw-1 do plots, Linexy(*,*,i),/DEV, COL=cols(i), $
LINES=Lstyle(i), THICK=Lthick(i)
end