Figure 5.1 Example of an Image Display (Lysozyme)
A predicted Laue pattern, based on the current parameters, may also be displayed superimposed on the image. The <Display/Measure Image> option is available from the processing menu and during parameter refinement as well as from the main menu.
When the option is selected, the following menu is displayed:
<Measure Image> <Show Predicted Pattern> <X-distortion Image> <Y-distortion Image> <Re-display Normal Image>The program first checks that at least one pack has has been defined; if it has not, a pop-up error notice will be displayed and the program will return to the previous menu when its 'continue' box has been selected (e.g. the main menu if the option was called from that menu). A film/plate centre for spot position determination is determined from the position of the fiducials or from the defined centre position. The image is read in at this stage if this has not already been done and the image is then displayed in an image view-object. The centre position is marked on the displayed image.<Return to Previous Menu>
The options which may be selected from the menu are described in detail in the next sections.
List of sections:
Measure Image
Show Predicted Pattern
X-Distortion Image
Y-Distortion Image
Re-Display Normal Image
Spot Input Parameter Table
When this option is selected any spots currently in the input spots list are marked on the image display and another menu is displayed:
<Cursor in Centre> <Find Conics Centre> <Gnomonic Centre> <Reset x_cen_f, y_cen_f> <Input Spot Positions> <Read Spots File> <Write Spots File> <Clear Spots List> <Get Background Image>The first four options are concerned with the measurement of the centre position of the image, options five to eight with the measurement of spot positions and option nine with the calculation of a background image. When the required measurements have been performed, the user returns to the previous menu by selecting the <Measurement Complete> option. If the current film/plate is not the same as the last one measured then the spot positions list will start clear.<Measurement Complete>
The measurement options are described in the following sections.
List of subsections in this section:
Cursor In Centre
Find Conics Centre
Gnomonic Centre
Reset x_cen_f, y_cen_f
Input Spot Positions
Read Spots File
Write Spots File
Clear Spots List
Get Background Image
When the option is selected, all current symbols are cleared from the display. Spot input parameters are then set in parameter table 3 (section 5.7) .
The following menu is then displayed:
<Calculate Conic> <Calculate Centre> <Redo Current Conic>The message 'Input Conic 1' is displayed in the image active strip area. Spot positions should then be input for the first conic (Error notices will be displayed if there are any problems encountered when trying to determine a spot position). When at least five spot positions have been input (move cursor to spot position (on the main image or on the magnifying window) and click Button1 of the mouse), the conic may be calculated by selecting the <Calculate Conic> menu option.The program will then fit a conic to the measured spots using a least squares procedure;if a singular matrix is found, an error message will be output; the user may then choose to input more spots for the current conic or to remove that conic. The process is then repeated for further conics. After at least three conics have been determined, the position of the centre of the Laue pattern may be calculated as the point of intersection of the conics by selecting the <Calculate Centre> option. The program uses the image mid point as an estimate of the centre and refines the position using the Powell minimisation routine from the Laue library. The determined centre position is output and the user is given the choice of accepting or not accepting the result.<Abort Centre Calculation>
If, during the input of spot positions of a conic, the user wishes to clear the spot selection for that conic, the the <Redo Current Conic> option may be selected; the user may then repeat the input for the same or for an alternative conic.
When finding the conics centre, warning messages will be output if the current program limits, for the number of conics and spots per conic, are exceeded.
If the new centre position has been accepted then a pop-up notice asks the user whether the x_cen_f and y_cen_f centre position parameters are to be updated and the x_c and y_c camera constants reset to zero. If the answer is yes then the parameter values will be changed for the current pack and plate and also, if appropriate, for other packs and plates (see Chapter 1 and Appendix 1 ). If the answer is no then the new centre centre position is only used for the measurement of spot positions; x_cen_f, y_cen_f, x_c and y_c may be updated at a later stage using the <Reset x_cen_f, y_cen_f> option if required.
When the option is selected, all current symbols are cleared from the display. Spot input parameters are then set in parameter table 3 (section 5.7) . details).
The following menu is then displayed:
<Redo Current Conic> <Calculate Centre>Messages in the image active strip area indicate which spot is to be input e.g. 'Input Conic 1 start spot', 'Input Conic 1 middle spot', 'Input Conic 1 end spot' etc. (Error notices will be displayed if there are any problems encountered when trying to determine a spot position). After the sets of three spots for at least three conics have been determined, the position of the centre of the Laue pattern may be calculated by selecting the <Calculate Centre> option. The program uses the image mid point as an estimate of the centre and refines the position using the Powell minimisation routine from the Laue library. The determined centre position is output and the user is given the choice of accepting or not accepting the result.<Abort Centre Calculation>
If, during the input of spot positions of a conic, the user wishes to clear the spot selection for that conic, the the <Redo Current Conic> option may be selected; the user may then repeat the input for the same or for an alternative conic.
When finding the gnomonic centre, warning messages will be output if the current program limit, for the number of conics, is exceeded.
If the new centre position has been accepted then a pop-up notice asks the user whether the x_cen_f and y_cen_f centre position parameters are to be updated and the x_c and y_c camera constants reset to zero. If the answer is yes then the parameter values will be changed for the current pack and plate and also, if appropriate, for other packs and plates (see Chapter 1 and Appendix 1 ). If the answer is no then the new centre centre position is only used for the measurement of spot positions; x_cen_f, y_cen_f, x_c and y_c may be updated at a later stage using the <Reset x_cen_f, y_cen_f> option if required.
The following menu is then displayed:
<Add Spots> <Delete Spots>When the <Input Spot Positions> menu item is selected, the program is in 'Add Spots' mode and the message 'Input Spot Positions' is displayed in the active strip of the image view-object. Any spots currently in the spots list will be marked by red crosses on the image display. New spot positions are input by moving the cursor to the required spot position on the image display (on the main image or on the magnifying window) and clicking Button1 of the mouse. When a spot position is selected, it will be marked by a red cross on the display. A warning message will be output when the program's spot list is full. Error notices will be displayed if there are any problems encountered when trying to determine a spot position. To delete spots, select the <Delete Spots> menu item, move the cursor to the symbol of the spot to be deleted (again on the main image or on the magnifying window) and click Button1 of the mouse. (The selected spot nearest to the cursor will be deleted provided that the distance squared from the cursor to symbol on the main image display area does not exceed 18). To input further spot positions, select the <Add Spots> item from the menu.<End Spots Input>
When all the required spots have been input, select the <End Spots Input> menu item.
Note that the spots input list is cleared either when a new film/image-plate pack is input or when the film/plate number has been changed since the previous <Measure Image> menu item selection or when it is cleared explicitly (see below) .
The user is then prompted for the spots file name as follows:
Symbols will be drawn on the film image for the centre position and for all the spots currently in the spots list.
<2-D Search> <Radial X Strip> <Radial Y Strip>This enables one of three background image calculation methods to be invoked. When a background image has been calculated, it will remain in use until another plate is selected.<Return to Previous Menu>
This background image calculation is for single crystal X-ray diffraction images (i.e. one with spots over a fairly slowly changing background. The method calculates the background at a pixel by taking the average of the lowest pixel values in a box surrounding the pixel such that the number of such values is a requested percentage of the total number of pixels in the box. To optimise the calculation, the box is 'walked' through the image moving a pixel at a time starting at the top left. It then repeats the process of moving from to bottom, then one pixel to the right, then from bottom to top, and then one pixel to the right until the film image has been covered. The calculation is done on the compressed image as displayed in the image view-object.
When the option is selected the following prompt/reply sequence is entered:
Messages will be output when the background calculation is started and when it is completed. An error message will be output if the selected box size is too large for the displayed image and the calculation will be abandoned.
An example of such a background image (for a Proflavin film) is shown in the figure at the end of Appendix 8 .
This background image calculation is for single crystal X-ray diffraction images (i.e. one with spots over a fairly slowly changing background. The method calculates the background at a pixel by taking the average of the lowest pixel values in a box surrounding the pixel such that the number of such values is a requested percentage of the total number of pixels in the box. The background values are found for a horizontal (along 'xd') strip of pixels running through the centre of the image and the values from the two halves of the strip are averaged to give a radially averaged background function from which a background image is calculated. The calculation is done on the compressed image as displayed in the image view-object.
When the option is selected the following prompt/reply sequence is entered:
Messages will be output when the background calculation is started and when it is completed. An error message will be output if the selected box size is too large for the displayed image or if the program is unable to allocate some extra temporary memory that it requires and the calculation will be abandoned.
This option enables a predicted Laue pattern based on the current parameters in parameter tables 1 and 2 to be overlaid on the displayed image. The program first generates the predicted pattern (if this has not already been done for the current parameter values) and determines the film/plate centre position. Normally all predicted reflections will be displayed by default; however there is a program limit on the number of predicted reflections which may be displayed on an image and if this is exceeded selected nodals will be displayed instead; in this latter case a prompt will request the user input of a nodal selection index (see description of the <Display Nodals Only> option).
When a pattern is displayed, all current corrections, such as centre offsets and distortion parameters, will be applied to the get the predicted spot positions.
The following menu will then be displayed allowing the user to change the selection of predicted reflections to be displayed:
<Display All Predicted> <Display Nodals Only>The options are described in the following sections.<Return to Previous Menu>
List of subsections in this section:
Display All Predicted
Display Nodals Only
Nodal spots will be shown as blue crosses and non-nodal spots as green crosses. (See also Appendix 9 )
If this option is requested, an image is created showing the x-distortion at each point of the image calculated using the current values of the distortion parameters. The image is compressed as for the normal image display in the main image display area. The pixel values represent the distortion in units of 1/100 rasters e.g. 500 is equivalent to 5 rasters. The user defined colour map is set so that there is a range of colours blue ... green ... yellow ... orange ... red going from low to high. Points outside the valid range for correction are shown with a pixel value of zero.
This is the same as the previous option except that the y-distortion at each point of the image is shown.
After displaying a distortion image, selecting this option enables the normal image display to be shown again.
When input spot positions are to be measured, the following parameters are output to parameter table 3:
Spot method: Spot box (mm): Spot threshold:The spot may be either 'c_of_g' to measure the spot centre of gravity within the specified spot measurement box (see also Appendix 10 ) or 'input' to use the cursored input position directly. The spot box size in mm defines the size of a box centred at the input cursor position and used when finding the spot centre of gravity position; when finding such a position only pixels whose intensities exceed the background value at the box centre position by the requested spot threshold value are considered. The spot box size retains its current value unless
or
or