; Written by  Craig Brown
;************************************************************************************************
;###############################################################################
;
; LICENSE:
;  The software in this file is written by an employee of
;  National Institute of Standards and Technology
;  as part of the DAVE software project.
;
;  The DAVE software package is not subject to copyright protection
;  and is in the public domain. It should be considered as an
;  experimental neutron scattering data reduction, visualization, and
;  analysis system. As such, the authors assume no responsibility
;  whatsoever for its use, and make no guarantees, expressed or
;  implied, about its quality, reliability, or any other
;  characteristic. The use of certain trade names or commercial
;  products does not imply any endorsement of a particular product,
;  nor does it imply that the named product is necessarily the best
;  product for the stated purpose. We would appreciate acknowledgment
;  if the DAVE software is used or if the code in this file is
;  included in another product.
;
;###############################################################################
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


pro launch_dcsgui,event

    device,decomposed = 0
;
; Default root file name.
defsysv,'!dcs_default_root','dcs_test',0
;
; Assumed distance from sample to detectors.etc.
defsysv, '!dave_planck', 6.62606876d-34, 1 ; J s
defsysv, '!dave_nmass', 1.67492716d-27, 1 ; kg
defsysv, '!dave_e', 1.602176462d-19, 1 ; C
defsysv, '!dave_boltzmann', 1.3806503d-23, 1 ; J K-1
defsysv,'!dcs_hom',(!dave_planck/!dave_nmass)*1.e7
defsysv,'!dcs_hbar',(!dave_planck/(2*!dpi))*1.e7
defsysv,'!dcs_mevcon',!dave_e*1.e4
defsysv,'!dcs_hsq2mn',(!dave_planck*1.e7)^2/(2.0*!dave_nmass)/!dcs_mevcon*1.e13
defsysv,'!dcs_boltzmann',!dave_boltzmann*1.e7
defsysv,'!dcs_dsd',4010.0
defsysv,'!ext_pgen',120.0

    work_dir=(*!dave_defaults).workdir
    data_dir=(*!dave_defaults).datdir

    ogui = obj_new('dcs_test_gui',group_leader = event.top, $
                                  notifyId = [event.id,event.top], $
                                  work_dir = work_dir, $
                                  data_dir = data_dir)

 ;   widget_control,event.top,set_uvalue=(*statePtr).daveptr

end
