./
bens.pro
Routines
result = NUMtSTR(x, y)
result = BEN_UNDEFINED(x)
result = BEN_READTEXT(widgetID)
result = BEN_SELECTWID(base, i, n, labelID, wkn, comp)
result = BEN_COMMANDS(base, i, masq, comp)
BEN_CHANGE_WORKSPACE, uv
result = BEN_WK_SIZE(x)
BEN_READ_WK, x, work, wkx, wky, wkn, wkp, datpar
BEN_WRITE_WK, x, work, wkx, wky, wkn, wkp, datpar
result = desk_name(i, test, string)
result = desk_winNum(str)
result = desk_ismodule(x)
result = desk_newWin(x)
result = desk_loadRequest(module, wkn, w, x, y, n, p, par)
desk_event, ev, uv
P_BEN_EVENT, ev, uv
P_BEN_CREATE, base, only
df_event, ev, uv
result = df_testModule(x)
df_animate, varAccess, x, base
df_animation_loop, varAccess, base
df_zoom, varAccess, test, add, xrg, yrg, minPix
df_unzoom, varAccess, test, minPix
df_add_zoom, varAccess, valx, valy
df_update_mini, varAccess, pixWin, test, xrg, yrg
df_change_numb, varAccess, n
df_slider_event, varAccess, x
df_set_slider, varAccess, x
df_change_scale, varAccess, type
df_autoscale, varAccess, test
result = df_zone(varAccess, y)
result = df_correct(varAccess, x)
result = df_selecty(varAccess, y0, y1)
df_draw_event, varAccess, ev
df_mini_event, varAccess, ev
df_makePix, varAccess, x, y
df_display, varAccess, x, y, z, minPix
df_loadRange, varAccess, test, r1, r2, r3, r4, r5, r6, r7
df_loadData, varAccess, w, x, y, n, p, par, dims
result = df_loadRequest(varAccess, wkn, w, x, y, n, p, par)
df_loadWorkspace, varAccess, x, labID
df_toggle_load, varAccess, x
df_select_sym, varAccess, test, sym
df_surf, varAccess
df_help, base
df_psfile, varAccess, base, n
df_dialog_event, varAccess, ev, uv
df_numor, varAccess
df_initData, varAccess, request
df_defaultData, varAccess
result = df_inits(test, x)
ben_df_create, lamp, n, m, base, request
int_event, ev, uv
result = int_testModule(x)
int_help, base
result = int_middle(varAccess, x, y)
int_poly, a1, a2, a3, c, c_x, c_y, r1, r2, deg2rad, test, squared
int_drawAxes, varAccess
int_miniPix, varAccess, test
result = int_radial(win)
int_plotMenu, varAccess, uv
result = int_area(varAccess, bet1, bet2)
result = int_inZone(varAccess, x, y, a1, a2, r1, r2, mx, my)
int_updateRes, varAccess, labelID, logID, didID
int_plot, varAccess, data, rays, test, new, maxVal, XPS, logID, didID
int_updateMini, varAccess, ev, uv
int_changeZone, varAccess, ev, gamID, openID
int_changeCenter, varAccess
int_updateRay, varAccess, ev, x
int_zonePlot, varAccess, test
result = int_loadRequest(varAccess, wkn, w, x, y, n, p, par)
int_loadData, varAccess, w, x, y, n, p, par, dims
int_loadWorkspace, varAccess, k, labelID
int_numor, varAccess
int_initData, varAccess, request
int_defaultData, varAccess
result = int_inits(test, x)
ben_int_create, desk, n, m, base, request
ben_int_slider_set, id, value
result = ben_int_slider_get(id)
rgp_event, ev, uv
result = rgp_testModule(x)
rgp_help, varAccess, base
result = mask(x, apMask)
rgp_loadMask, varAccess, x
rgp_writeMask, varAccess, x
rgp_numor, varAccess
rgp_loadData, varAccess, wkn, w, x, y, n, p, par, dims
result = rgp_loadRequest(varAccess, wk, w, x, y, n, p, par)
rgp_loadWorkspace, varAccess, wk, labelID
rgp_writeWorkspace, varAccess, x
result = groupp(w_in)
rgp_mask_event, varAccess, ev
rgp_info, varAccess, test
rgp_changeMax, varAccess, x, drag, dataMax, labelID
rgp_toggleBtn, varAccess, x, test
rgp_toggleExport, varAccess, x, test, btnID
rgp_imask, varAccess, n, eras, redrw
rgp_applyMask, win, yin, cur, ind, res, resy
rgp_groupNum, varAccess, n, disp
rgp_drawGroups, varAccess
rgp_initData, varAccess, request
rgp_defaultData, varAccess
result = rgp_inits(test, x)
ben_rgp_create, desk, n, m, base, request
bens
Routine details
top NUMtSTR
******* ******* ** This function converts any number to a string, with `y' digits after ** the dot. `y' is always less than 7.
Parameters
- x
- y
top BEN_UNDEFINED
result = BEN_UNDEFINED(x)
******* ************* ** Return ` if the variable `x' is undefined.
Parameters
- x
top BEN_READTEXT
result = BEN_READTEXT(widgetID)
******* ************ ** This function reads the value of the widget_text `widgetID', ** and returns a float equal to this value.
Parameters
- widgetID
top BEN_SELECTWID
result = BEN_SELECTWID(base, i, n, labelID, wkn, comp)
******* ************* ** This function creates three widget_buttons, for workspace selection. ** The message ('Load', or 'Write') is determine by the parameter `n'. ** The user value of this widgets are 401, and (403+n). The '' ** buttons should call the BEN_CHANGE_WORKSPACE procedure, that will ** handle everything. Additionnal elements can be put in the user value ** of the center button by passing them in the `comp' parameter. ** The value returned by this function are the three buttons ID number.
Parameters
- base
- i
- n
- labelID
- wkn
- comp
top BEN_COMMANDS
result = BEN_COMMANDS(base, i, masq, comp)
******* ************ ** This function creates the 'Done', workspace selection widgets, and ** 'help' buttons that are present at the top of the function windows. ** It also creates a widget_label. The `mask' parameter is an array ** used for preventing the function from creating the 'help' button, ** or the label. Those widget are created if the corresponding value ** (mask(0): help, mask(1): label) are set to 0. The default value is ** mask=[0,0]. The workspace selection widgets are created by calling ** the BEN_SELECTWID function. ** The returned value is an array of the widgets ID number.
Parameters
- base
- i
- masq
- comp
top BEN_CHANGE_WORKSPACE
BEN_CHANGE_WORKSPACE, uv
** ******************** ** This procedure should be called to handle the workspace selection ** widgets. Only the user value must be passed. Its form is: ** uv=[-88,4xx,x,{add/sub},{btn "Wxx"},{btn ""},x] ** The currently selected workspace number is stored into the element ** number 3 of the center button.
Parameters
- uv
top BEN_WK_SIZE
result = BEN_WK_SIZE(x)
******* *********** ** This function returns the size of the workspace Wx.
Parameters
- x
top BEN_READ_WK
BEN_READ_WK, x, work, wkx, wky, wkn, wkp, datpar
** *********** ** This procedure reads the LAMP workspace Wx, and all the linked data ** (eg Xx, Yx, PARx ...), and writes them in the parameter variables.
Parameters
- x
- work
- wkx
- wky
- wkn
- wkp
- datpar
top BEN_WRITE_WK
BEN_WRITE_WK, x, work, wkx, wky, wkn, wkp, datpar
** ************ ** This procedure writes the parameters into LAMP variables, ** creating or replacing the workspace Wx and accompaying data.
Parameters
- x
- work
- wkx
- wky
- wkn
- wkp
- datpar
top desk_name
result = desk_name(i, test, string)
******* ********* ** If (i lt 0), this function inits the commons, and returns the number ** of display function that it 'knows'. If (i ge 0), then this function ** returns, depending on the value of `test', the function `i' name, its ** event handler name...
Parameters
- i
- test
- string
top desk_winNum
result = desk_winNum(str)
******* *********** ** Given the ID string of a module (e.g. "df", "int"), ** returns the module number.
Parameters
- str
top desk_ismodule
result = desk_ismodule(x)
******* ************* ** Calls the "testModule" function of the specified module, in order ** to check if the module really exists. The value returned by this ** function determines whether the display function `i' can only be ** run once, or not. Those values are stored in an array, for use ** by the desk_event procedure.
Parameters
- x
top desk_newWin
result = desk_newWin(x)
******* *********** ** This function `x' returns a number to open a new module `X'. It does ** NOT check if the function can be run several times or not. ** If the function `x' is not already running, the result is always 0.
Parameters
- x
top desk_loadRequest
result = desk_loadRequest(module, wkn, w, x, y, n, p, par)
******* **************** ** This function is used by a module, to have another module ** load the data {w x y n p par} (wkn is the workspace number if needed). ** The function checks how many wanted modules are already opened; ** if all available modules (maxWin) are opened, the data are loaded ** in the first module.
Parameters
- module
- wkn
- w
- x
- y
- n
- p
- par
top desk_event
** ********** ** This procedure is called by the LAMP desktop display function buttons. ** It checks if the wanted function (uv(1)-400) is already running, ** via the desk_newWin function, and runs a new one, or unmap the running ** one, depending if it can be opened several times, and if the maximum ** windows are already opened.
Parameters
- ev
- uv
top P_BEN_EVENT
** *********** ** Exxecutes a "xxx_event" procedure, where xxx is a function code.
Parameters
- ev
- uv
top P_BEN_CREATE
** ************ ** Creation of the widget_buttons that call the display function. ** The procedure checks the presence of a function by calling the ** desk_ismodule function for every function. If a function appears ** to be absent, no button is created for it.
Parameters
- base
- only
top df_testModule
result = df_testModule(x)
******* ************* ** Returns 0, for `singleRun'. That means it can run several times.
Parameters
- x
top df_animate
df_animate, varAccess, x, base
** ********** ** This procedure is called by the animation menu. Whether an animation ** is already running or not, it only changes the speed, or calls ** the df_animation_loop procedure.
Parameters
- varAccess
- x
- base
top df_animation_loop
df_animation_loop, varAccess, base
** ***************** ** This procedure contains the loop for the animation. ** This loop does several things: first, the user_value are read, ** so that the variables used for plotting are always updated. ** Then the plot is done; the number of curves shown on each ** images depends on the value of the 'number of plots' slider. ** At the end of the loop, another 'wait' loop is run, so the animation ** does not run too fast; the `speed' setting is used in this ** loop. The loop also contains a call to the widget_event procedure. ** So, during the animation, the user can change the speed, the xrange, ** the number or plots, or the displayed workspace. A test to check ** if the window has not been destroyed (eg, by using the 'Done' button) ** is done in the main loop.
Parameters
- varAccess
- base
top df_zoom
df_zoom, varAccess, test, add, xrg, yrg, minPix
** ***************** ** This procedure zooms, with an xrange of xrg, and an yrange or yrg if ** the autoscale variable is set to . If test is set to 0, ** the xrg and yrg are given in 'mini' window coordinates; otherwise, ** the parameters are given in the main 'scroll' window corrdinates. ** If `add' is set to 1, then the current ranges are added to the zooms ** list, by calling df_add_zoom. ** The `minPix' parameter is only to be passed to the df_display procedure. ** Its purpose is to avoid recalculating a picture when it is already ** known somewhere; it is used in loops, when a pixmap is created before ** the loop, and df_zoom called in the loop.
Parameters
- varAccess
- test
- add
- xrg
- yrg
- minPix
top df_unzoom
df_unzoom, varAccess, test, minPix
** ********* ** This procedure calls the df_zoom procedure with the top element ** of the zooms list (a 'Last In First Out' stack) if test is set to 0. ** Otherwise, df_zoom is called with the full ranges. ** If the zooms list is used, then the top element is removed from ** the stack.
Parameters
- varAccess
- test
- minPix
top df_add_zoom
df_add_zoom, varAccess, valx, valy
** *********** ** Adds [valx,valy] to the zooms list. The zoom list is a 'Last In First Out' ** stack, of a maximum size of 'varAccess.constants.zoom_max' elements.
Parameters
- varAccess
- valx
- valy
top df_update_mini
df_update_mini, varAccess, pixWin, test, xrg, yrg
** ************** ** This procedure copies the current spectrum in the mini window, ** and draws over it the 'selection' rectangle, defined by the ** coordinates xrg and yrg, if test is set to 1, or by the saved ** coordinates otherwise. If `pixWin' is less than 1, then it is assumed ** that no pixmap window is containing the desired plot, so it is ** created by calling df_makePix. If `pixWin' is greater or equal to 1, ** then the window `pixWin' is copied into the mini window.
Parameters
- varAccess
- pixWin
- test
- xrg
- yrg
top df_change_numb
** ************** ** This procedure is called by the 'number of plots' slider. It updates ** the variables 'options.num', the 'pos' array, and the display.
Parameters
- varAccess
- n
top df_slider_event
** *************** ** Event sent by the scrolling slider. The 'options.disp' variable is ** modified by calling 'df_display', which also updates the display.
Parameters
- varAccess
- x
top df_set_slider
** ************* ** This procedure is used to set the scrolling slider to a given value. ** It is used in the 'df_animation_loop' procedure, for example.
Parameters
- varAccess
- x
top df_change_scale
df_change_scale, varAccess, type
** *************** ** Updates the yrange and the display when the autoscale type is changed.
Parameters
- varAccess
- type
top df_autoscale
** ************ ** This procedure calculates the new yrange, according to the ** current xrange, and to the autoscale type. If the autoscale is set ** to , then the new yrange is not calculated, unless ** the `test' parameter is set to 1.
Parameters
- varAccess
- test
top df_zone
result = df_zone(varAccess, y)
******* ******* ** This function returns the number of the 'zone' containing ** the points at (x,`y'). If the points is not in any 'zone', then ** the returned value is -1.
Parameters
- varAccess
- y
top df_correct
result = df_correct(varAccess, x)
******* ********** ** This function returns a corrected value of x, so that when plotting ** the selection rectangle, it is included in the axis.
Parameters
- varAccess
- x
top df_selecty
result = df_selecty(varAccess, y0, y1)
******* ********** ** This function returns data used when dragging the mouse in the ** scroll window, to draw the selection rectangle. It returns two ** values, r0 and r1; the selection rect will be of the form ** {x0,(zone_bottom + `r0'),x1,(zone_top - `r1')}.
Parameters
- varAccess
- y0
- y1
top df_draw_event
** ************* ** This procedure exits immediatly if the event is a release event. ** If an animation is running, the clicking in this window just stops ** the animation. Pressing the right mouse button calls the df_unzoom ** procedure. Dragging the mouse with the left mouse button draws a ** selection rectangle; when the mouse button is released, the df_zoom ** procedure is called. For drawing the selection rectangle, a pixmap ** of the displayed plots is first created; then, a loop reads the mouse ** position, and copies the pixmap into the picmap ID 0, and plots over ** this pixmap the selection rectangles. Then, the pixmap ID 0, is ** copied to the scroll window.
Parameters
- varAccess
- ev
top df_mini_event
** ************* ** This procedure quits if the event is not a button pressed. ** If the button is the right one, then the df_unzoom is called. Otherwise, ** a pixmap with the currently displayed spectrum is created. It is used ** in the loops that read the cursor position. If the pressed button is ** the center one, then the loop draws a rectangle of a constant size ** in pixmap ID 0, where the previous pixmap has been copied, then pixmap ** ID 0 is copied to the mini window, and the df_zoom procedure is called, ** so that moving the selection rect is updated in real time. If the ** pressed button is the right one, then the loop just draws a new selection ** rect, with the same method as above. In both case, the loop exits when ** the mouse button is released. The events are cleared at the end of ** the procedure, so pressing several buttons generates only one event, ** for the first button pressed.
Parameters
- varAccess
- ev
top df_makePix
** ********** ** This procedure creates a pixamp ID `x', and draws inside the ** plots corresponding to the scroll window (`y' set to 1), ** or to the mini window (`y' set to 0), according to the settings.
Parameters
- varAccess
- x
- y
top df_display
df_display, varAccess, x, y, z, minPix
** ********** ** This procedure displays the spectrum `x', if the displayed one is ** not the `x' one, or if `y' is set to 1. It modifies the variable ** settings.disp and after that, calls df_makePix to create the new ** plots picture; the pixmap is then copied into the scroll window. ** If z is set to 1, the mini window is also updated, by calling ** the procedure df_update_mini.
Parameters
- varAccess
- x
- y
- z
- minPix
top df_loadRange
df_loadRange, varAccess, test, r1, r2, r3, r4, r5, r6, r7
** ************ ** This procedure writes the parameters into user value of ** the correct widget_label; which params, and which widget_label ** is determined by the `test' parameter: when set to 0, the seven ** parameters r1 to r7 are stored as ranges, when set to 1, r1 and r2 ** only are stored into varAccess.limits.
Parameters
- varAccess
- test
- r1
- r2
- r3
- r4
- r5
- r6
- r7
top df_loadData
df_loadData, varAccess, w, x, y, n, p, par, dims
** *********** ** Writes the parameters into the data widget user values. ** The purpose of this procedure is only to avoid to type ** several times the same commands.
Parameters
- varAccess
- w
- x
- y
- n
- p
- par
- dims
top df_loadRequest
result = df_loadRequest(varAccess, wkn, w, x, y, n, p, par)
******* ************** ** This procedure modifies all variables for loading new data. ** All the needed data are passed as parameters. The returned value ** is 0 if `w' does not meet the size requirements (ie two-dimensional ** array), otherwise, the result is 1. ** When loading new data, the ranges, the limit values must be modified; ** the options.disp might need to be changed too, if the new data contains ** less spectra than the currently displayed spectrum.
Parameters
- varAccess
- wkn
- w
- x
- y
- n
- p
- par
top df_loadWorkspace
df_loadWorkspace, varAccess, x, labID
** **************** ** This procedure reads all the data linked to the LAMP workspace Wx, ** and calls the df_loadRequest. It also prints messages about the ** current status ("loading", or "invalid workspace").
Parameters
- varAccess
- x
- labID
top df_toggle_load
** ************** ** This procedure modifies the options.surface variable, that sets ** whether a surface is plotted or not, when loading a workspace.
Parameters
- varAccess
- x
top df_select_sym
df_select_sym, varAccess, test, sym
** ************* ** This procedure modifies the variable that hold the current ** plot symbol; then, the display is updated.
Parameters
- varAccess
- test
- sym
top df_surf
df_surf, varAccess
** ******* ** Simply plots a surface, using Xi and Yi, in the scroll window.
Parameters
- varAccess
top df_psfile
** ********* ** This procedure creates and displays a dialog window, to enter ** the PostScript file name. A 'Cancel' button destroy the new ** window. The creation of the PS file is done in the df_dialog_event ** procedure.
Parameters
- varAccess
- base
- n
top df_dialog_event
df_dialog_event, varAccess, ev, uv
** *************** ** This procedure is called by any widget of the PS file dialog, created ** by df_psfile. If the widget is the 'Cancel' button, then the window ** is simply destroyed. If it is the 'OK' button or the text widget, ** the content of the widget_text is read. If it is empty, then the ** procedure acts if the 'Cancel' button had been pressed. Otherwise, ** the plot is set to 'ps', and the file_name to it. The plot is done, ** and the file closed. After that, the previous plot device is restored. ** If an output error occurs, the current file is closed, and the device ** restored too, and an error string is displayed. In both case, the ** dialog window is destroyed.
Parameters
- varAccess
- ev
- uv
top df_numor
df_numor, varAccess
** ******** ** This procedure displays the number numor in a label.
Parameters
- varAccess
top df_initData
df_initData, varAccess, request
** *********** ** Fill the data variables, according to `request'. If `request' is ** set to 1, the scroll spectra window was opened because of a ** request from the desk; the function must start with the ** requested data, stored in the common `ben_data'. So, if `request' ** is set to 1, those data are loaded; if it is set to 0, default ** data are loaded, by calling `df_defaultData'.
Parameters
- varAccess
- request
top df_defaultData
df_defaultData, varAccess
** ************** ** Inits the data when 'Scroll Spectra' is not called via 'request'
Parameters
- varAccess
top df_inits
******* ******** ** This function returns some default value for the parameter ** settings, or constants of the program.
Parameters
- test
- x
top ben_df_create
ben_df_create, lamp, n, m, base, request
** ************* ** scroll spectra gui creation
Parameters
- lamp
- n
- m
- base
- request
top int_middle
result = int_middle(varAccess, x, y)
******* ********** ** This function returns the middle angle of x and y.
Parameters
- varAccess
- x
- y
top int_poly
int_poly, a1, a2, a3, c, c_x, c_y, r1, r2, deg2rad, test, squared
** ******** ** Procedure 'int_poly' draws the section enclosed in angles ** a1 and a3, and radia r1 and r2, in the current window.
Parameters
- a1
- a2
- a3
- c
- c_x
- c_y
- r1
- r2
- deg2rad
- test
- squared
top int_drawAxes
int_drawAxes, varAccess
** ************ ** This procedure updates the mini widget_draw.
Parameters
- varAccess
top int_miniPix
** *********** ** This function calculates an array, according to the ** options, of the same size as the mini widget_draw. ** This array is stored, so that, when changing the ** mini widget_draw, it can be used for `tvscl'.
Parameters
- varAccess
- test
top int_radial
result = int_radial(win)
******* ********** ** to print from w20 workspace
Parameters
- win
top int_area
result = int_area(varAccess, bet1, bet2)
******* ******** ** This function returns the minimum rectangle containing ** the sector between bet1 and bet2, and r1 and r2.
Parameters
- varAccess
- bet1
- bet2
top int_inZone
result = int_inZone(varAccess, x, y, a1, a2, r1, r2, mx, my)
******* ********** ** This function tests if the point (x,y) is in the zone ** defined by the angles a1 and a2, and the radia r1 adn r2. ** It also verifies that (x,y) is not within the mask mx,my. ** If the point is in the zone and not masked, then the function ** returns the radius it belongs to; else, it returns -1.
Parameters
- varAccess
- x
- y
- a1
- a2
- r1
- r2
- mx
- my
top int_updateRes
int_updateRes, varAccess, labelID, logID, didID
** ************* ** This procedure first calls `int_changeCenter', to read the ** widget_text, in case the user forgot to type return to validate. ** Then the integration is done. When the result is obtained, it ** is plotted by calling the `int_plot' procedure.
Parameters
- varAccess
- labelID
- logID
- didID
top int_plot
int_plot, varAccess, data, rays, test, new, maxVal, XPS, logID, didID
** ******** ** This procedure plots the data (result of an integration), with ** an xrange of `rays', and a maximum value equal to `maxVal'. ** If new is equal to 1, then the previous plot is erased. The ** `test' param is used to test if `data' is the major plot or not. ** This procedure is useful to plot several results, obtained with ** different angles and/or rays, in the same window.
Parameters
- varAccess
- data
- rays
- test
- new
- maxVal
- XPS
- logID
- didID
top int_updateMini
int_updateMini, varAccess, ev, uv
** ************** ** This procedure is called to respond to an event from ** an angle (alpha,beta or gamma) widget_slider.
Parameters
- varAccess
- ev
- uv
top int_changeZone
int_changeZone, varAccess, ev, gamID, openID
** ************** ** Called when the '# of sectors' slider sends an event. ** If the value has not changed, the procedure return; if the ** new value is 2, then the gamma value stored in the gamma slider ** is restored. Then , Called when the '# of sectors' slider sends an event. ** If the value has not changed, the procedure return; if the ** new value is 2, then the gamma value stored in the gamma slider ** is restored. Then, the mini picture is updated.
Parameters
- varAccess
- ev
- gamID
- openID
top int_changeCenter
int_changeCenter, varAccess
** **************** ** This procedure reads the four widget_texts, and updates ** the corresponding variables, and the mini picture. ** It is called by the 'updateRes' procedure, and when the ** return key is pressed within a widget_text.
Parameters
- varAccess
top int_updateRay
int_updateRay, varAccess, ev, x
** ************* ** Updates the ray variables, and redraws the mini picture.
Parameters
- varAccess
- ev
- x
top int_zonePlot
** ************ ** Called by the two-state button 'Separate symetrical sectors'
Parameters
- varAccess
- test
top int_loadRequest
result = int_loadRequest(varAccess, wkn, w, x, y, n, p, par)
******* *************** ** This function checks the size of the parameter `w'. If it ** is not a 2-dimension array, then it returns 0. If `w' is a ** 2-dimension array, it is loaded, and the radia, and center ** widgets and variables are modified. Then the mini picture ** is modified, and an integration is calculated.
Parameters
- varAccess
- wkn
- w
- x
- y
- n
- p
- par
top int_loadData
int_loadData, varAccess, w, x, y, n, p, par, dims
** ************ ** This procedure just writes its parameters in their ** appropriate place.
Parameters
- varAccess
- w
- x
- y
- n
- p
- par
- dims
top int_loadWorkspace
int_loadWorkspace, varAccess, k, labelID
** ***************** ** Tests if the workspace Wk has good dimensions. If it is ** the case, the procedure `int_loadRequest' is called. If the ** workspace does not fit dimension requirement, an error ** message is displayed in the widget_label `labelID'.
Parameters
- varAccess
- k
- labelID
top int_numor
int_numor, varAccess
** ********* ** The display of the numor is done only in the title bar, ** because there is no room left in the window ! ** It is never used, because Px does not seem to contain ** the numor number.
Parameters
- varAccess
top int_initData
int_initData, varAccess, request
** ************ ** Fill the data variables, according to `request'. If `request' is ** set to 1, the integration window was opened because of a ** request from the desk; the function must start with the ** requested data, stored in the common `ben_data'. So, if `request' ** is set to 1, those data are loaded; if it is set to 0, default ** data are loaded, by calling `int_defaultData'.
Parameters
- varAccess
- request
top int_defaultData
int_defaultData, varAccess
** *************** ** This procedure is called to store the default data, when ** the integration function is not opened for a request.
Parameters
- varAccess
top int_inits
******* ********* ** This function returns some default value for the parameter ** settings, or constants of the program.
Parameters
- test
- x
top ben_int_create
ben_int_create, desk, n, m, base, request
** ************** ** create radial integration gui ** Modified to work with sans_settings (everywhere you find "sans")
Parameters
- desk
- n
- m
- base
- request
top ben_int_slider_set
** ****************** ** added to be compatible with SANS
Parameters
- id
- value
top ben_int_slider_get
result = ben_int_slider_get(id)
******* ****************** ** added to be compatible with SANS
Parameters
- id
top rgp_testModule
result = rgp_testModule(x)
******* ************** ** This function returns the value of 'singleRun' for the grouping ** function. Also it could be run several times, it is limited to ** only one value, because several ones should be confusing.
Parameters
- x
top mask
******* **** ** This function is to be used as a macro; its syntax is: ** Wi=mask(Wj,m), or Wi=mas(j,m) ** where `m' is the number of a mask (from 1 to 4) ** The masks are stored into the 'rgp_lampmask' common.
Parameters
- x
- apMask
top rgp_loadMask
** ************ ** This porcedure is called by one of the 'load mask' button. ** It reads one of the four mask stored in the common, and ** uses it for the current mask. It calls the imask procedure ** that updates the display and the grouping. Then the infos ** about the spectra are updated too.
Parameters
- varAccess
- x
top rgp_writeMask
** ************* ** This procedure writes the current mask in the 'Mx' variable ** of the rgp_lampmask common.
Parameters
- varAccess
- x
top rgp_numor
rgp_numor, varAccess
** ********* ** This procedure is called at startup, and when loading a new ** workspace, to display the numor in the window title and on ** a label.
Parameters
- varAccess
top rgp_loadData
rgp_loadData, varAccess, wkn, w, x, y, n, p, par, dims
** ************ ** This procedure just writes its parameters in their ** appropriate place.
Parameters
- varAccess
- wkn
- w
- x
- y
- n
- p
- par
- dims
top rgp_loadRequest
result = rgp_loadRequest(varAccess, wk, w, x, y, n, p, par)
******* *************** ** This function is called by the desk, or by the 'loadWorkspace' ** procedure, to make its parameters the current data. First, ** the procedure checks the data is a 2-dimensional array, and ** then the other parameters are also checked, and replaced or ** modified if needed. All variables are updated if needed, and so ** is the display and the grouping. ** The value returned by this function is 1 if the data were ** correctly loaded, 0 if there was a problem, such as trying to ** load a 'bad sized' workspace.
Parameters
- varAccess
- wk
- w
- x
- y
- n
- p
- par
top rgp_loadWorkspace
rgp_loadWorkspace, varAccess, wk, labelID
** ***************** ** This procedure simply calls the loadRequest function, but it ** displays messages in its parent window if the loading failed.
Parameters
- varAccess
- wk
- labelID
top rgp_writeWorkspace
rgp_writeWorkspace, varAccess, x
** ****************** ** This procedure first transforms the current data by applying ** the mask and grouping the spectra, and then output the result ** either to the LAMP workspace Wx if x is greater than 0, or to ** the 'Scroll Spectra' function.
Parameters
- varAccess
- x
top rgp_mask_event
** ************** ** This is the procedure called by the widget_draw when the mouse is ** used inside it. It calls the imask procedure to modify the ** current mask, and to update everything.
Parameters
- varAccess
- ev
top rgp_info
** ******** ** Called to update the two info labels. The first one contains info ** about the masked spectra. The second label is updated only if ** `test' is set to one, and contains info about the total number ** of spectra in the current data.
Parameters
- varAccess
- test
top rgp_changeMax
rgp_changeMax, varAccess, x, drag, dataMax, labelID
** ************* ** This procedure is called by the 'maximum value' slider, when it's ** moved. A value is displayed in a label beside the slider, to ** simulate a non-linear slider. The display is updated only when ** the slider is released (`drag' is set to 0).
Parameters
- varAccess
- x
- drag
- dataMax
- labelID
top rgp_toggleBtn
rgp_toggleBtn, varAccess, x, test
** ************* ** This procedure handles the two toggle buttons. It modifies the ** correct variable/uservalue.
Parameters
- varAccess
- x
- test
top rgp_toggleExport
rgp_toggleExport, varAccess, x, test, btnID
** **************** ** This procedure modifies the variables concerning the output.
Parameters
- varAccess
- x
- test
- btnID
top rgp_imask
rgp_imask, varAccess, n, eras, redrw
** ********* ** This procedure modifies the mask: it masks/unmasks the spectra ** n(0) to n(1), depending if n(0) is already maked or not. It then ** replots the column showing the mask, updates the data display ** if the opt.hideMask is set to 1. The new grouping is also ** calculated, and the new groups displayed on the right.
Parameters
- varAccess
- n
- eras
- redrw
top rgp_applyMask
rgp_applyMask, win, yin, cur, ind, res, resy
** ************* ** This procedure applies the mask `cur' to the `Win' spectra, and ** also modifies the angles contained in `Yin'. The results are ** returned into `res' and `resy'.
Parameters
- win
- yin
- cur
- ind
- res
- resy
top rgp_groupNum
rgp_groupNum, varAccess, n, disp
** ************ ** This procedure calculates the groupings. ** The range of unmasked angles is searched, and then the list of ** the sinus of the half-angles is divided into `n' parts, which ** are of the same width. If a part is empty, ie it does not include ** any spectrum, it is removed. In a part, the `average' angle is ** set to the mean value of its limits, and not to the mean of ** the angles corresponding to the spectra. The 'grouped' spectrum ** is the average of all the included spectra.
Parameters
- varAccess
- n
- disp
top rgp_drawGroups
rgp_drawGroups, varAccess
** ************** ** This procedure just draws the left-most ribbon in the display ** area, to represent the current groups.
Parameters
- varAccess
top rgp_initData
rgp_initData, varAccess, request
** ************ ** Fill the data variables, according to `request'. If `request' is ** set to 1, the function window was opened because of a ** request from the desk; the function must start with the ** requested data, stored in the common `ben_data'. So, if `request' ** is set to 1, those data are loaded; if it is set to 0, default ** data are loaded, by calling `rgp_defaultData'.
Parameters
- varAccess
- request
top rgp_defaultData
rgp_defaultData, varAccess
** *************** ** This procedure is called to store the default data, when ** this function is not opened for a request.
Parameters
- varAccess
top rgp_inits
******* ********* ** This function is used for variable initialization.
Parameters
- test
- x
top ben_rgp_create
ben_rgp_create, desk, n, m, base, request
** ************** ** This the procedure called by the LAMP Desktop to create a new ** window. `n' is the item 2 of the widgets user value. Is is used ** by P_BEN_EVENT to select which function the incoming events must ** be sent too. `m' is used only for the title. `base' is an output ** variable, used to return the new window ID number. If the window ** is created to respond to another function request, then `request' ** is set to 1, so the function will inits its data using the ** variables stored in the 'ben_data' common.
Parameters
- desk
- n
- m
- base
- request
File attributes
Modification date: | Tue Oct 1 14:35:35 2013 |
Lines: | 3,434 |