; ; VERSION FOR KANZELHOEHE SOLAR OBSERVATORY ; ; LAST MODIFICATION: May 23, 2000 by Michael Steinegger ; ;====================================================================== PRO about_box, id ;+ ; NAME: ; ABOUT_BOX ; ; PURPOSE: ; Display about message from help menu, ; ; CATEGORY: ; BBSO Archiving System. ; ; CALLING SEQUENCE: ; ABOUT_BOX, id ; ; INPUTS: ; ID: Event ID of dialog parent. ; ; OUTPUTS: ; None. ; ; MODIFICATION HISTORY: ; 2000-02-10, Carsten Denker, Big Bear Solar Observatory/New Jersey ; Institute of Technology ; 2000-03-31, Michael Steinegger, BBSO/NJIT ; ;- cr = STRING( 13B ) str = [ 'Archive Tool KSO Version 1.0' + cr,' ' +cr,$ 'Carsten Denker BBSO/NJIT 10 February 2000' + cr, $ 'Michael Steinegger BBSO/NJIT 20 April 2000'] val = DIALOG_MESSAGE ( str, /INFORMATION, DIALOG_PARENT = id ) RETURN END FUNCTION menu_def, d ;+ ; NAME: ; MENU_DEF ; ; PURPOSE: ; Definition of the menu bar items. ; ; CATEGORY: ; BBSO Archiving System. ; ; CALLING SEQUENCE: ; MENU_DEF, d ; ; INPUTS: ; D: Structure of the menu bar items. ; ; OUTPUTS: ; None. ; ; MODIFICATION HISTORY: ; 2000-02-10, Carsten Denker, Big Bear Solar Observatory/New Jersey ; Institute of Technology ; ;- d = REPLICATE( { flags: 0, name: '' }, 10 ) d.flags = [ 1, 0, 0, 2, $ ;----- file menu 1,2,$ ;----- flat field 1,2,$ ;----- check data 1,2] ;----- process data d.name = [ 'File', 'About', 'Help', 'Exit', $ ;----- file menu 'Flat Field','KX4',$ ;----- flat field 'Check Data','KX4',$ ;----- check data 'Process Data','KX4'] ;----- process data RETURN, d END PRO archive_tool_event, ev ;+ ; NAME: ; ARCHIVE_TOOL_EVENT ; ; PURPOSE: ; Event handling procedure for the ARCHIVE_TOOL application. ; ; CATEGORY: ; BBSO Archiving System. ; ; CALLING SEQUENCE: ; ARCHIVE_TOOL_EVENT, ev ; ; INPUTS: ; EV: Event structure received from the ARCHIVE_TOOL application. ; ; OUTPUTS: ; None. ; ; MODIFICATION HISTORY: ; 1999-12-08, Carsten Denker, Big Bear Solar Observatory/New Jersey ; Institute of Technology ; 2000-02-10, Carsten Denker, BBSO/NJIT, only basic GUI for Yunnan ; Observatory ; 2000-03-31, Michael Steinegger, BBSO/NJIT, only basic GUI for ; Kanzelhoehe Solar Observatory ;- COMMON TOP, wid, date, data ;----- what kind of event? WIDGET_CONTROL, ev.id, GET_UVALUE = uvalue IF uvalue EQ 'MAIN_PULLDOWN' THEN BEGIN CASE ev.value OF 'File.Exit': WIDGET_CONTROL, ev.top, /DESTROY 'File.About': ABOUT_BOX, ev.top 'Flat Field.KX4': BEGIN da = CW_DATE( wid.bs ) IF date( 0 ) NE 0 THEN FLATFIELD, wid, date END 'Check Data.KX4': BEGIN HA_CHECK, wid END 'Process Data.KX4': BEGIN da = CW_PROCESS( wid.bs ) IF data( 0 ) NE 0 THEN HA_FLAT, wid, data END ELSE: tmp = DIALOG_MESSAGE ( 'Not implemented!', DIALOG_PARENT = ev.top ) ENDCASE ENDIF RETURN END PRO archive_tool ;+ ; NAME: ; ARCHIVE_TOOL ; ; PURPOSE: ; Archive all synoptic BBSO data. ; ; CATEGORY: ; BBSO Archiving System. ; ; CALLING SEQUENCE: ; ARCHIVE_TOOL ; ; INPUTS: ; None. ; ; OUTPUTS: ; None. ; ; MODIFICATION HISTORY: ; 1999-12-08, Carsten Denker, Big Bear Solar Observatory/New Jersey ; Institute of Technology ; 2000-02-10, Carsten Denker, BBSO/NJIT ; Only basic GUI for Yunnan Observatory. ; 2000-03-31, Michael Steinegger, BBSO/NJIT, only basic GUI for ; Only basic GUI for Kanzelhoehe Solar Observatory. ; 2000-04-20, Michael Steinegger, BBSO/NJIT ; Text widget for output included. ; Flat fielding of large data set included. ; Help button included. ; ;- COMMON TOP, wid, date, data wid={bs:long(0),d1:long(0),t1:long(0)} t0 = SYSTIME( 1 ) ;----- only one archive tool is allowed IF XREGISTERED( 'archive_tool' ) THEN BEGIN tmp = DIALOG_MESSAGE( 'ARCHIVE_TOOL is already running!' ) RETURN ENDIF ;----- create top-level base widget wid.bs = WIDGET_BASE(MBAR=bar, /COLUMN, TLB_FRAME_ATTR=1,$ TITLE='Archive Tool - Global H-alpha Network - Kanzelhoehe Solar Observatory') ;----- menu bar pd = CW_PDMENU( bar, MENU_DEF( ), /HELP, /MBAR, /RETURN_FULL_NAME, UVALUE = $ 'MAIN_PULLDOWN' ) ;----- draw widget wid.d1 = WIDGET_DRAW( wid.bs, FRAME = 2, XSIZE = 768, YSIZE = 512 ) ;----- text widget wid.t1 = WIDGET_TEXT( wid.bs, FRAME = 2, /SCROLL, /WRAP, XSIZE = 80, YSIZE = 12 ) WIDGET_CONTROL, wid.t1, SET_VALUE = [ '',$ ' ***** Welcome to ARCHIVE TOOL for KSO on ' + $ SYSTIME( 0 )+' *****', '' ] ;----- realize the widget hierarchy WIDGET_CONTROL, wid.bs, /REALIZE ;----- display default KSO images WIDGET_CONTROL, wid.d1, GET_VALUE = index WSET, index READ_JPEG, 'kso.jpg', img TV, img, TRUE = 1 ;----- invoke the XMANAGER routine to manage the widget event loop XMANAGER, 'archive_tool', wid.bs RETURN END