This structure is obtained from:
<tt>LightVars=Light_Get_LightVars()</tt>
The contents is as follow: The Custom procedure (LightVars.Instrument.CustomPro) may enrich/extend LightVars (specially Instrument, Displays, Private, Handles). See below Custom variables: IN6.
GENERIC='mad' ;connect to the mad-idl interface
<tt> TYPE='monitor' ;then V=DialNewValue() stands for V=DialNewValue(TYPE='monitor')</tt> <tt> ONOFF=1 ;state of the Dial 1=running</tt> <tt> FREQUENCY=1. ;the Dial macro is executed each frequency seconds. if =0 then the general frequency is used</tt> <tt> VALUE='Starting Light ' ;value you assign to the Dial. This value is automaticaly plotted. put errors in ERROR var.</tt> <tt> PLOT=100 ;-2=none 0=plot 1=surface 2=contour n>2 means show vector of last n scalar values</tt> <tt> UPPERLIM=0. ;upper limit of the plot (LOWERLIM for lower limit)</tt> <tt> HISTORY=0 ;=1 to record values in file light.his</tt> <tt> Preset=0 ;if >0 then Dial is stopped after running Preset seconds</tt> <tt> WUPDATE=0 ;=1 to automaticaly update corresponding workspace, =-1 silent!</tt> <tt> ;=2 to automaticaly update and plot workspace to the main window</tt> <tt> ; 0,1,2 are set by pressing the left,middle,right mouse button on the dial snapshot</tt> <tt> INIT=0</tt>
;User Variables (Must be present in return statement to be available) ;-------------
<tt>GLOBAL ={LIGHT_GLOBAL,$</tt> <tt> ConfigDir:'/home/cs/lambda/CALIBRATION/in6/',$</tt> <tt> Verbosity:'debug',$ ; information display verbosity level(silent, normal, verbose, debug)</tt> <tt> TerminalEcho:1L, $ ; if non 0 will output messages to IDL prompt window</tt> <tt> CurrentDir:'',$ ; starting directory</tt> <tt> IniFile:'Light.ini',$ ; contains Light init info</tt> <tt> ConfigFile:'Config.ini',$ ; contains info about Monochromators and Choppers</tt> <tt> LogFile:'Light.log',$ ; name of Light Log file</tt> <tt> RunFile:'Run.run',$ ; contains runs info</tt> <tt> Simulation:3L, $ ; 1:simulation mode (no action on instrument), 0:instrument control, 2: Mad active but in simulation mode, 3:use real MAD data, 4: use McStas simulation</tt> <tt> Append_Runs:0L, $ ; 1: add new loaded runs after existing run sequence. 0: replace run sequence</tt> <tt> Current_Run:0L $ ; current run (displayed/running)</tt> <tt> }</tt>
To top
<tt>PRIVATE = {LIGHT_PRIVATE, $ ; these are only internal variables, not to be saved in .ini files</tt> <tt> LogText:'', $</tt> <tt> MadLogText:'Starting MAD Log recording at '+systime(0), $</tt> <tt> UserName:'unknown ',$</tt> <tt> LocalContact:'ILLstaff',$</tt> <tt> ExpTitle:'00-00-000 <sample><config><params> comments---', $</tt> <tt> Numor: '99999 ', $</tt> <tt> SubTitle:'00-00-000 <sample><config><params> comments---', $</tt> <tt> MonitorSum:0., DetectorSum:0., TSample:0., TRegulation:0., $</tt> <tt> IsSuperUser:0L,$ ; set to true(1) for Restricted operations</tt> <tt> Version:'2.0.4 (Nov 13th 2002)',$</tt> <tt> Author:'E. Farhi, A. Schober, D. Richard. (c)ILL', $</tt> <tt> Base_Size:[0L, 0L], $</tt> <tt> Major_Update_Nb:10L, $</tt> <tt> Update_Nb:0L, $ ; this value is incremented, and every 10 steps, a Major Update is done</tt> <tt> OnGoing_Run_Nb:-1, $ ; # of running 'Run', -1 if inactive</tt> <tt> First_Run_Nb:0L, $ ; first run # in sequence</tt> <tt> Last_Run_Nb:-1L, $ ; last run # in sequence, -1 means go to end of sequence</tt> <tt> LastErrorMsg:'no alert', $</tt> <tt> WaitTempTime:0L, $ ; time of beginning of Wait temperature stabilisation</tt> <tt> AlarmTempTime:0L, $ ; time when T first gets out from limits</tt> <tt> TempoTempTime:0L, $ ; first time a temporary counting is requested</tt> <tt> AccuracyAchieved:0L, $ ; activated when statistics is ok for all ROIs on cumulated data, reset</tt> <tt> ROIs : 0L, $ ; list of last actualised {xrange, yrange} structures retrieved from XROI</tt> <tt> Data_Cumulated:0, $ ; cumulated data in same counting (repetition)</tt> <tt> Temp_History:0, $ ; last 10 regulation Temperature measures</tt> <tt> Temp_Stats:[0.,0.,0.], $; [mean-TSet, stddev, slope of Temp_History</tt> <tt> LastValidNumor:[0., 0., 0., 0., 0.], $ ; non 0 when T got out of limits, [numor, t_res.nrepet, t_res.nprep, t_res.xc, t_res.jc]</tt> <tt> TemperatureUnstable:0L, $ ; 0 means T is ok, 1 means out of limits since Wait_Error</tt> <tt> ErrorMsgToggle:1L}</tt>
To top
<tt>RUN = {LIGHT_RUN, Titles:['Run description'],$ ; all are arrays...</tt> <tt> Temperatures:[300.0],$</tt> <tt> Preset:[30.0],$</tt> <tt> Repetition:[1],$</tt> <tt> Lambda:[5.12], $</tt> <tt> Wait_T:[15.0],$ ; wait time between T changes</tt> <tt> Wait_Error:[15.0],$ ; wait time in case of T/scan error</tt> <tt> dT_Low:[1.0],$ ; lower check value for T stability</tt> <tt> dT_High:[1.0],$ ; higher check value for T stability</tt> <tt> Option_Command:[''], $ ; optional command to execute in Run. Can begin with: 'idl:','<generic>:','system:'. Default is 'idl:'</tt> <tt> CountStatAccuracy:[5.0], $</tt> <tt> Flag_T:[1L],$ ; flags for CheckT,RunDiag,CountStat,SavePerm,TShiftType(T/%)...</tt> <tt> Flag_Diag:[0L],$ ; use Diagnosis</tt> <tt> Flag_Count:[0L],$ ; Count on Statistics</tt> <tt> Flag_Save:[1L],$ ; save permanently</tt> <tt> Flag_MonTi:[1L],$ ; false/true for acquisition on Monitor/Time respect.</tt> <tt> Flag_dT_AbsRel:[0L] } ; false/true for check DeltaT in Absolute/Relative}</tt>
To top
<tt>MAD ={LIGHT_MAD, t_nother:0, t_res:0, t_para:0, t_status:0, t_counts:0, t_chopper:0, status:'<Starting>', data:0} ; will be re-dimensioned with Tools_StructSetValue</tt>
To top
<tt>HANDLES ={LIGHT_HANDLES, Base:0L,$</tt> <tt> Base_Mad_Status:0L, $ ; Base of MAD Status</tt> <tt> Mad_Status:0L, $ ; Text within Base of MAD Status</tt> <tt> Base_Alert_Status:0L, $ ; widget ID of Alert states (on top)</tt> <tt> MonitorSum:0L, DetectorSum:0L, TSample:0L, TRegulation:0L, $ ; widget IDs of Mon, Det, TSam, TReg</tt> <tt> UserName:0L, $ ; widget IDs of UserName, LocalContact, ExpN, ExpTitle</tt> <tt> LocalContact:0L, $</tt> <tt> ExpTitle:0L, $</tt> <tt> Current_Run:0L,$</tt> <tt> Titles:0L,$ ; widget IDs of Run Title, Temp, Preset, Repetition, Remaining time</tt> <tt> Temperatures:0L,$</tt> <tt> Preset:0L,$</tt> <tt> Repetition:0L,$</tt> <tt> Lambda:0L, $</tt> <tt> Wait_T:0L,$</tt> <tt> Wait_Error:0L,$</tt> <tt> dT_Low:0L,$</tt> <tt> dT_High:0L,$</tt> <tt> Flag_T:0L,$ ; widget IDs of Check temp, Run Diags, CountOnStat, SaverPerm</tt> <tt> Flag_Diag:0L,$</tt> <tt> Flag_Count:0L,$</tt> <tt> Flag_Save:0L,$</tt> <tt> Flag_MonTi:0L,$</tt> <tt> Flag_dT_AbsRel:0L,$</tt> <tt> CountStatAccuracy:0L, $</tt> <tt> RunFile:0L, $</tt> <tt> Base_Help:0L, $</tt> <tt> Base_Mad_Log:0L, $</tt> <tt> Base_Light_Log:0L, $</tt> <tt> Run_Options:0L, $</tt> <tt> Base_SuperUser:0L, $</tt> <tt> Option_Command:0L, $</tt> <tt> Base_Run_Analyse:0L, $</tt> <tt> Simulation:0L, $</tt> <tt> Numor:0L, $</tt> <tt> SubTitle:0L, $</tt> <tt> RunStartButton:[0L, 0L, 0L], $</tt> <tt> RunStatus:0L, $</tt> <tt> CountStatsText:0L, $</tt> <tt> LoadSaveCfg:[0L, 0L] }</tt>
To top
<tt>DISPLAYS = {LIGHT_DISPLAYS, $</tt> <tt> Variables:[''], $</tt> <tt> Type:[''], $</tt> <tt> Options:['']}</tt> ; should be loaded from Config.cfg (protected parameters) but here is a default config (just in case the file can not be found)
To top
<tt>INSTRUMENT = { Name:"", Type:"", CustomPro:'Light_Custom_IN6_Update, LightVars' }; custom Data block where are saved specific instrument data</tt>
<tt>LightVars = {generic:GENERIC,type:TYPE,value:VALUE,frequency:FREQUENCY, OnOff:OnOff, init:INIT,plot:PLOT, global:GLOBAL,mad:MAD,handles:HANDLES, run:RUN, instrument:INSTRUMENT, displays:DISPLAYS, private:PRIVATE}</tt>
To top
IN6
<tt>; Here follows a default IN6 configuration</tt> <tt> ; center range time step opt_value</tt> <tt> Data = [[[4920.00, 200.00, 1.00000, 10.0000, 4920.00 ] ,$ ;wave=4.14 monok 1</tt> <tt> [5060.00, 200.00, 1.00000, 10.0000, 5060.00 ] ,$ ; monok 2</tt> <tt> [5355.00, 200.00, 1.00000, 10.0000, 5355.00 ]] ,$ ; monok 3</tt>
<tt> [[4400.00, 300.00, 1.00000, 30.0000, 4400.00 ] ,$ ;wave=4.60</tt> <tt> [4556.00, 300.00, 1.00000, 30.0000, 4556.00 ] ,$</tt> <tt> [4825.00, 300.00, 1.00000, 30.0000, 4825.00 ]] ,$</tt>
<tt> [[3800.00, 190.00, 1.00000, 10.0000, 3800.00 ] ,$ ;wave=5.12</tt> <tt> [3960.00, 190.00, 1.00000, 10.0000, 3960.00 ] ,$</tt> <tt> [4220.00, 190.00, 1.00000, 10.0000, 4220.00 ]] ,$</tt>
<tt> [[2640.00, 200.00, 10.0000, 20.0000, 2640.00 ] ,$ ;wave=5.92</tt> <tt> [2790.00, 200.00, 10.0000, 20.0000, 2790.00 ] ,$</tt> <tt> [3050.00, 200.00, 10.0000, 20.0000, 3050.00 ]]]</tt>
To top
<tt>CustomInstr = {LIGHT_CUSTOMDATA_IN6, $ ; instrument configuration to be loaded/saved from/into .ini files</tt> <tt> Type:'Time-of-Flight' , Name:'IN6', $</tt> <tt> CustomMenuItems :['Instrument...', $</tt> <tt> 'Instrument (Choppers)...', $</tt> <tt> 'Instrument (Monochromators)...', $</tt> <tt> 'Restore IN6 Default Displays', $</tt> <tt> 'Experiment header...',$</tt> <tt> 'Count NOW ! (1 min)' ], $</tt> <tt> CustomMenuPro :['Light_Event_Custom_IN6_Setup_Build, LightVars', $</tt> <tt> 'Light_Event_Custom_IN6_Setup_Build, LightVars & Light_Event_Custom_IN6_Setup_Choppers, LightVars', $</tt> <tt> 'Light_Event_Custom_IN6_Setup_Build, LightVars & Light_Event_Custom_IN6_Setup_Monochromators, LightVars', $</tt> <tt> 'Light_Event_Custom_IN6_Default_Displays, LightVars', $</tt> <tt> 'Light_Event_Custom_IN6_Edit_Header, LightVars', $</tt> <tt> 'Light_Control, 0, ''count 60 t n'''], $</tt> <tt> EnergyDefinitions : [4.14, 4.6, 5.12, 5.92], $ ; energy values physically achievable on the instrument</tt> <tt> EnergyOptions :'discrete wavelength superuser', $ ; may be limits, free, discrete</tt> <tt> ElastPeakChannels : [235L, 275L, 315L, 350L], $ ; default elastic line channel for 512 channels</tt> <tt> MonokSequence : [2,1,0], $</tt> <tt> MonokDSpacing : 3.355, $ ; d[AA] lattice-spacing for monochromators. PG002=3.355</tt> <tt> MonokData : Data, $ ; reform(Data, 5,n_elements(MonokSequence),n_elements(EnergyValues))</tt> <tt> MonokFluxMon_TOF : 0L, $ ; 0 if monochromator rocking curve calibrates on Monitor, 1 if on TOF (detectors)</tt> <tt> MonokUseOldValues : 0L, $ ; 0 if monochromator rocking angles are computed, 1 if use table (Y. Blanc)</tt> <tt> EnergyCommand :'par wavelength %f', $ ; <lambda></tt> <tt> MonokRAZCommand :'raz', $</tt> <tt> MonokSetCommand :'mono%d %d', $ ; <number> <position></tt> <tt> MonokCntCommand :'count %f t n', $ ; <time_s></tt> <tt> CountCommand :'count %f %s %d %s',$; <time> <time|mon> <nrep> <save|nosave></tt> <tt> TempReadCommand :'rte', $</tt> <tt> TempWriteCommand :'pte %f', $</tt> <tt> ChoppersStopCommand:'kill', $</tt> <tt> StopCommand : 'stop', $</tt> <tt> PauseCommand : 'pause', $</tt> <tt> ResumeCommand : 'resume', $</tt> <tt> CommentCommand : '! %s', $</tt> <tt> SetUserCommand :'par user %s', $ ; <UserName+' '+LocalContact></tt> <tt> SetTitleCommand :'par title %s', $ ; <title></tt> <tt> SetSubTitleCommand:'par subtitle %s', $ ; <subtitle></tt> <tt> SetEnvirCommand :'par environement %s', $ ; <env. code></tt> <tt> SetComputeCommand :'par compute %s', $ ; t_para.compute_par</tt> <tt> ChoppersSetCommand:'par chop s %7.2f r %d P1 %6.2f P2 %6.2f', $ ; <fermi_speed> <ratio> <phase_ferm> <phase_supp> (<offset>)</tt> <tt> ChoppersSynchro :'chopper synchro wait', $</tt> <tt> TOFSetCommand :'par tof channel %f width %f delay %f', $ ; <n_chan> <chan_width> <delay></tt> <tt> ElPeakCommand :'par elpeak %d', $ ; <elpeak chan></tt> <tt> PeriodCommand :'par period %f', $ ; <period></tt> <tt> AutoFlags : [1,1,1], $ ; automatic setup flags for Choppers/Monok/Check of elastic peak</tt> <tt> SetupEnergies : [0., 0., 0.], $ ; values of the energy for which chopper/monok/elastic peak where set</tt> <tt> Distances_CC_CS_SD: [0.200, 0.395, 2.483], $; [m] Distances Chopper1-Chopper2, Chopper2-Sample, Sample-Detector</tt> <tt> ChopperSpeedRatio : 1., $ ; [1] speed ratio Fermi/Supp</tt> <tt> Focus_Energy : 0., $ ; [meV] focusing to specified energy transfert</tt> <tt> N_channels : 128L, $ ; [512] Number of time channels</tt> <tt> ElectronicTimeBase: 0.125, $ ; [us] Electronic base time</tt> <tt> ElectronicDelay : 44.875, $ ; [us] Default Electronic Delay</tt> <tt> ReferencePhase : 90., $ ; [deg] Reference Phase</tt> <tt> PhaseOffset : 0. $ ; [deg] Phase Offset (added to Fermi phase)</tt> <tt> } ; enrich Light.Instrument</tt>
To top
CustomPrivate = {LIGHT_PRIVATE_IN6, $ MonokCurrentIndex : 0L, $ ; current monok index in sequence during rocking curve/positioning MonokScanPoint : 0L, $ ; current scan point during rocking curve MonokPosition : 0L, $ ; current position during rocking curve/positioning MonokLambdaData : 0L, $ ; current part of MonokData table for given lambda MonokX : [0.], $ ; vector of positions MonokY : [0.], $ ; vector of counts MonokYfit : [0.], $ ; vector of fitted counts MonokDisplayMsg : ['','',''], $ ; comment lines for the tree monochromators of IN6
<tt> EnergyValues : [0.,0.,0.,0.], $ ; energy values stored from previous setting</tt> <tt> EnergyUnit :'', $</tt> <tt> EnergyToSet : 0., $</tt> <tt> EnergyIndex : 0L, $</tt> <tt> Elastic_Peak_Chan : 315L, $ ; [315] Current Elastic_Peak position</tt> <tt> KeepMadData : 0L, $</tt> <tt> Environement : 'xx', $</tt> <tt> Delay : 0., $</tt> <tt> SpeedFermiTarget : 0., $</tt> <tt> PhaseFermiTarget : 0., $</tt> <tt> SpeedFermi : 0., $</tt> <tt> PhaseFermi : 0., $</tt> <tt> SpeedSupprTarget : 0., $</tt> <tt> PhaseSupprTarget : 0., $</tt> <tt> SpeedSuppr : 0., $</tt> <tt> PhaseSuppr : 0., $</tt> <tt> Period : 0., $</tt> <tt> ChannelWidth : 0., $</tt> <tt> AutoProcess : 0L, $</tt> <tt> DeadTime : 0. $</tt> <tt> }</tt>
To top
<tt>CustomHandles = { LIGHT_CUSTOMHANDLES_IN6, $</tt> <tt> SetupButtons: [0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L], $ ; chopper/monok/DoElastpeak/auto/stop/focusEn/Ratio/ChanNb/ElPeak/ElPeakMenu</tt> <tt> SetupStatus : [0L, 0L, 0L], $</tt> <tt> SetupFlags : [0L, 0L, 0L], $ ; auto flag handles</tt> <tt> Energy : [0L, 0L, 0L, 0L], $ ; energy value displays handles: lambda, E, k, v</tt> <tt> EnergySetup : 0L, $ ; main setup window handle</tt> <tt> MonokSetup : 0L, $ ; main monok window handle</tt> <tt> MonokButtons: [0L, 0L, 0L, 0L], $ ; Mono setup: rocking curve/position/status/table handles</tt> <tt> ChoppersSetup:0L, $ ; main Choppers window handle</tt> <tt> ChoppersButtons: [0L, 0L, 0L, 0L], $ ; Choppers setup: set/status/table handles</tt> <tt> ChopTofText : 0L $ ; TOF Choppers text Display</tt> <tt> } ; enrich Light.Handles</tt>
To top
|