NAME:
FUNCTION dial_light
** Start of Light (first call)
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
function Light_Get_LightVars
** Procedure to get Light data
ex: LightVars=Light_Get_LightVars()
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
PRO dial_light_macro, D
** main macro called by George every Frequency seconds
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Base_Alert, Lightvars, clear=clear, warning=warning, error=error, toggle=toggle, show=show
** Handle alert state
warning/error message are also appended to Light Log
keywords:
/clear: clear alert,
warning: add a warning
error: add an error
/toggle: toggle alert blinking state
/show: show Lght log
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Base_Build, LightVars
** Build the Main instrument panel (show user, local, experiments, runs, ...)
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Base_Event_Parser, event
** Light_Base_Event_Parser : event manager
Handles the event 'event' and get its uvalue 'uv' which is a string to be evaluated and executed
Update all Light variable structure
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Base_Get_Fields_ToDisplay, LightVars, index=index, header=header, h_val=h_val, spy=spy, s_val=s_val, run=run, r_val=r_val, check=check, c_val=c_val
** set values to display (from Global, updated on request) using index as Run_Nb in the Run sequence
INPUT: index
other keywords are return values
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Base_Init, LightVars
** Init of Light (start and read Config files)
in the order: default structure loaded at start-up, overload default instr config+user config/preferences
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Base_Load_Config_File, LightVars, file, contains=contains, path=path
** Read .INI file (Call TagFile for IniFile and ConfigFile)
INPUT: file
keyword contains acts as a filter, getting only fields containing 'contains'
keyword path is used for dialog_pickfile default path
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Base_Save_Config_File, LightVars, file=file, comment=comment, runs=runs, config=config, instrument=instrument, displays=displays
** Save Config_File (Inifile)
INPUT: file
keywords /runs /config /instrument /displays activate saving of specific sections
keyword comment is added to header
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Base_Update, LightVars
** Main Update procedure. Executed at each Dial Frequency
calls instrument Custom collect procedure, and update required base fields/widgets
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Control, LightVars, command
INPUT: LightVars (or 0), command
do the same as DialControl, but handles Simulation mode
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Close, LightVars
** Close Light and save user configuration
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Edit_Displays, LightVars
** Edit variables to be displayed by dial_display
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Edit_Header, LightVars
** calls Custom /edit_header
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Edit_Preferences, LightVars
** Display/Change Light Preferences
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Edit_ROI, LightVars, update=update
** Define and retrieve ROI (through IDL XROI tool)
This procedure makes usage of IDLgrROI objects
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Help_About, LightVars
** Display information about Light
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Help_Displays, LightVars, update=update
** Display information about Light/Displays
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Help_File, LightVars
** Display information about Light/File menu
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Help_Preferences, LightVars, update=update
** Display information about Light/Preferences
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Help_Run_Options, LightVars, update=update
** Display information about Light/Displays
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Help_Run_Start, LightVars
** Display information about Light/Setup menu
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Help_Setup, LightVars
** Display information about Light/Setup menu
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Load_Instr_File, Lightvars
** load instrument configuration file (when SU mode)
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Restart, LightVars
** Restart Light and Reads Initilisation files (Ini/Config)
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Analyse, LightVars
** Show/Analyse Run sequence
(See dial_light.pro)
Routines description - liste of routines
NAME:
pro Light_Event_Base_Run_Clear_All, LightVars
** Clear All Run definitions
(See dial_light.pro)
Routines description - liste of routines
NAME:
pro Light_Event_Base_Run_Delete, LightVars, Run_Nb=Run_Nb
** Delete Run definitions
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Fields, LightVars, Run_Nb=Run_Nb, restore=restore
** Update Current Run definition (called when user changes the current Run settings on Base)
not keyword_set(restore): get from Widgets into LightVars.Run if restore not set
keyword_set(restore): get from LightVars.Run into Widgets
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Insert, LightVars, Run_Nb=Run_Nb
** Insert a new Run definition, and shift furthers (if any)
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Load, LightVars
** Load an existing Run/Sequence file.
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Nb, LightVars, Run_Nb=Run_Nb
** Change Run number from Pop-up 'Run Nb' on main Frame
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Next, LightVars, Run_Nb=Run_Nb
** Jump to next Run_Nb
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Options_Build, LightVars, Run_Nb=Run_Nb
** Define/display current Run Options (safety margins, etc...)
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Pause, LightVars
** Pause any on going Run/Sequence, as well as any setup process
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Resume, LightVars
** Resume any on going Run/Sequence, as well as any setup process
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Save, LightVars
** Save Run/Sequence into a file
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Start_Run, LightVars
** Starts a Single Run (LightVars.Global.Current_Run)
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Start_Sequence, LightVars, first=first, last=last
** Starts a Sequence, starting from first, until last
if first = -1, starts at 0
if last = -1, ends with last run_nb
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Run_Stop, LightVars
** Stop any on going Run/Sequence, as well as any setup process
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Save_Instr_File, Lightvars
** load instrument configuration file (when SU mode)
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Save_Preferences, LightVars
** Save Config_File (Inifile)
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Show_Light_Log, LightVars
** Show Light log (of session)
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Show_MAD_Log, LightVars
** Show MAD log (recent lines) since last call to that function
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_Simulation, LightVars, Simulation=Simulation
** start/stop simulation mode/control mode
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Event_Base_SuperUser, LightVars, Event=Event
** Ask for SuperUser mode on creation
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_LogMessage, LightVars, DisplayLevel, Message
** Output Light message to IDL prompt, Light Log window and Light Log file
INPUT: LightVars, DisplayLevel, Message
Displays the Message if the present ActualLevel (LightVars.Verbosity)
matches the DisplayLevel (in silent, normal, verbose, debug)
The date is appended before the message
Message is appened to Light LogString (string array)
and is saved to Light Log file if specified
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_Set_LightVars, Tag, value
** Procedure to set Light data
ex: Light_Set_LightVars(), 'Global.Update_Nb', 0
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_SubDial_Base_Check_ROI, LightVars, show=show
** check all defined ROIs
compute for each :
1-the signal/noise ratio normalized to pixel cell number
2-a gaussfit nterms=6 fit, getting sigmaa
3-abs(smoothed signal/signal)
finish current counting if all criteria for all ROI are below specified accuracy
(See dial_light.pro)
Routines descriptions
Vers le haut
NAME:
pro Light_SubDial_Base_Check_Temperature, LightVars
** Checks temperature behaviour
analyse last 10 temperature measures
tells if temperature is within specified Run Options limits, or too high/low
compute linear slope from Temp_History using linfit
if Tout and AlarmTempTime eq 0 -> AlarmTempTime=now
if Tin and AlarmTempTime ne 0 -> AlarmTempTime = 0, LastValidNumor=0 (temperature got back within limits)
if Tout and now gt AlarmTempTime+Wait_Error (has been out for enough time) then
AlarmTempTime = 0 (remove alarm has it is handled here, a new alarm will be generated if required every Wait_T_error)
if slope is small then [set warning message]
if slope is high then [set error message]
[stop, start 'wait T control counting' -> RunUValue='count', if LastValidNumor eq 0 -> = numor]
when temperature change is requested, LightVars.Private.WaitTempTime ne 0
(See dial_light.pro)
Routines descriptions
Vers le haut