;+ ; ; FILE HXIS.PRO -- The HXIS (SMM) display program using widget applications. ; ; REQUIREMENTS : IDL Version 2 with widgets, or better. ; X windows graphics device. ; Poscript device if hardcopies are desired. ; ; To test to see if widgets are available : ; ; IDL> if (!D.FLAGS AND 65536) NE 0 THEN PRINT, 'WIDGETS ARE AVAILABLE.' ; ; ; ; Required logical definitions: ; define HXIS_DATA to data location ; define HXIS_CAT to catalogs' location ; the catalogs are: ; HXIS_COARSE.RAT ; HXIS_FINE.RAT ; HXIS_UVCAT.D80 ; HXIS_UVCAT.T80 ; HXLOGO.IMG ; ; HXIS program file names all have the form "HXIS*.PRO" ; Common block file names all have the form "HXIS*.COMMON" ; ; Non "HXIS*.PRO" files that are required: ; ACKNOWLEDGE.PRO ; GET_MY_WINDOW.PRO ; HELIOG.PRO ; LINECOLORS.PRO ; OPSYS_LGCL.PRO ; PSPLOT.PRO ; RESPOND_WIDG.PRO ; UTPLOT...and related programs ; WINUP.PRO ; ; ; Significant program paths: ; ; HXIS->HXISSTRUC ; ->HXISWIDGET --> HXISDWIDG_EV ---> HXISREAD ----> HXISDEFAULTS ; ---> HXISCPLOT ----> HXISCALC_IMG ; ---> HXISTPLOT ; ---> HXISXPLOT ; ---> HXISTSPEC ; ---> additional secondary programs ; are accessed through widget events ; ;============================================================================= ; ; NAME: ; HXIS ; ; PURPOSE: ; Starts up the HXIS image processing. ; Initializes the layout of the HXIS images to be displayed ; ; CATEGORY: ; HXIS display ; ; CALLING SEQUENCE: ; HXIS [,GROUP_LEADER=GROUP] ; ; CALLED BY: ; none required, but is setup to be called by another routine ; ; CALLS TO: ; LINECOLORS, HXISSTRUC, HXISNINT, HXISSTRLABEL, ATIME, HXISWIDGET ; ; INPUTS: ; none ; ; OPTIONAL INPUTS: ; GROUP_LEADER: is the widget id of a calling widget routine ; This will clean up widgets if caller is killed ; ; OUTPUTS: ; none explicit, only through commons ; ; OPTIONAL OUTPUTS: ; none ; ; COMMON BLOCKS: ; hxisarea.common ; hxiscolor.common ; hxisgrid.common ; hxisdata_info.common ; hxislayout.common ; hxiswindow.common ; ; SIDE EFFECTS: ; Temporarily creates an IDL window and loads a color table. ; ; RESTRICTIONS: ; Requires X windows device, and a postscript device for hard copies ; ; PROCEDURE: ; Variables are initialized and stored in common block ; ; MODIFICATION HISTORY: ; OCT-1990, Paul Hick (ARC) ; DEC-1992, Elaine Einfalt (HSTX) - converted to widgets ;- pro HXIS, group_leader=group ; Startup procedure for HXIS imaging package @hxisarea.common @hxiscolor.common @hxisgrid.common @hxisdata_info.common @hxislayout.common @hxiswindow.common if (!d.flags and 65536) ne 65536 then begin print,'WIDGETS are not available' return endif plotdev='PS' ; hardcopy device is postscript printer device, get_screen_siz=hxis_sc & lastmark=1 first_pass = 1 reuse = 1 ; reuse window each time window, /free, xsize=10, ysize=10 standard = 7 ; the user color table selection linecolors, line_r=line_r, line_g=line_g, line_b=line_b, $ used=colors_used, table=standard ; create/load a color table wdelete, !d.window ; choose color coded indexes for line plots ; yellow, red, orange, magenta, blue, green, cyan my_colors = [5, 2, 4, 12, 10, 3, 7, 9] ; save grid values for later use def_grid = 3 ; index for arrays below oldgrid = def_grid grid_butts = [' Solar limb only ', ' Spacing of 2 degree ', $ ' Spacing of 5 degrees ', ' Spacing of 10 degrees ', $ ' Spacing of 15 degrees '] grid_type = ['Limb only', '2 degrees', '5 degrees', $ '10 degrees', '15 degrees'] grid_deg = [0, 2, 5, 10, 15] HXISSTRUC, struc=info ; call to create structure info CGRID = -5.5+indgen(12) ; 12 coarse pixels with centers at ; -5.5,-4.5,...,5.5 FGRID = (-9.5+indgen(20))*0.25 ; 20 fine pixels with centers at ; -2.375,-2.125,...,2.375 A = [4,4,6] & B = rotate(A,2) & CBORD = [-A,-B,A,B] A = shift(CBORD,-3) & CBORD = [CBORD,CBORD(0)] & A = [A,A(0)] CBORD = [rotate(CBORD,1),rotate(A,1)] A = [4,4,6,6,8,8,10]*0.25 & B = rotate(A,2) & FBORD = [-A,-B,A,B] A = shift(FBORD,-7) FBORD = [FBORD,FBORD(0)] & A = [A,A(0)] FBORD = [rotate(FBORD,1),rotate(A,1)] ; The 576 values for the counts per pixel in each HXIS image will be read ; into the array DIMG(0:575) (pixel N in element N-1; N=1,576). ; CPOS establishes the relationship for the coarse field of view between the ; two dimensional array CIMG used to create the actual image and the HXIS ; pixels numbers. The number of counts for pixel (J,I) is taken ; from DIMG(CPOS(J,I)) (i.e. HXIS pixel CPOS(J,I)+1) and copied to CIMG(J,I). ; Note that row 0 of CPOS (and CIMG) corresponds to the bottom of the image. CPOS = intarr(12,12)-1 ; 0-127 CPOS(2:9,0:1) = 0+indgen( 8,2) CPOS(0:11,2:9) = 16+indgen(12,8) CPOS(2:9,10:11) = 112+indgen( 8,2) ; FPOS same as CPOS for the fine field of view. FPOS = intarr(20,20)-1 ;128-431 FPOS(6:13,0:1) = 128+indgen( 8,2) FPOS(4:15,2:3) = 144+indgen(12,2) FPOS(2:17,4:5) = 168+indgen(16,2) FPOS(0:19,6:13) = 200+indgen(20,8) FPOS(2:17,14:15) = 360+indgen(16,2) FPOS(4:15,16:17) = 392+indgen(12,2) FPOS(6:13,18:19) = 416+indgen( 8,2) FPOS = transpose(FPOS) & CPOS = transpose(CPOS) ; Bring north up A = hxisnint(1.) & hxisstrlabel,0,1,1 ; Only for compilation u = atime(utime(0)) ; compile now to save time later ; ; if values in commons are undefined, initialize those that need it ; if n_elements(pixels) eq 0 then pixels = -1 if n_elements(t_start) eq 0 then t_start = -1 if n_elements(t_stop) eq 0 then t_stop = -1 if n_elements(t_tover) eq 0 then t_tover = -1 if n_elements(t_back) eq 0 then t_back= -1 if n_elements(t_dead) eq 0 then t_dead = -1 if n_elements(t_deriv) eq 0 then t_deriv = -1 if n_elements(t_sig) eq 0 then t_sig = -1 if n_elements(t_pixels) eq 0 then t_pixels = -1 if n_elements(x_start) eq 0 then x_start = -1 if n_elements(x_stop) eq 0 then x_stop = -1 if n_elements(x_bin) eq 0 then x_bin = -1 if n_elements(x_tover) eq 0 then x_tover = -1 if n_elements(x_back) eq 0 then x_back = -1 if n_elements(x_dead) eq 0 then x_dead = -1 if n_elements(x_sig) eq 0 then x_sig = -1 if n_elements(x_pixels) eq 0 then x_pixels = -1 if n_elements(s_start) eq 0 then s_start = -1 if n_elements(s_stop) eq 0 then s_stop = -1 if n_elements(s_tover) eq 0 then s_tover = -1 if n_elements(s_nspec) eq 0 then s_nspec = -1 if n_elements(s_back) eq 0 then s_back = -1 if n_elements(s_dead) eq 0 then s_dead = -1 if n_elements(s_sig) eq 0 then s_sig = -1 if n_elements(s_pixels) eq 0 then s_pixels = -1 ; ; Create widgets ; hxiswidget, group_leader=group close, /all ; close file first_pass = 1 ; if enter HXIS again later return end