4.8.2 - Predicted Reflections List - JdlPredictedReflectionsList

John W. Campbell

4.8.2.1 Introduction

This class stores a list of predicted reflections for a monochromatic X-ray crystallographic rotation image. The class has methods for adding/deleting reflections, sorting the reflection list and calculating which spots will be spatially overlapped for a given spot size. In general, reflections are handled as JdlPredictedReflection objects.

Class, constructors and methods:

Class Details
Accessible Fields
Constructors
Manipulate Reflection List
Get Reflection Data
Sort Reflection List
Spatial Overlaps
Predict Reflections
Convert Indices

4.8.2.2 Class Details

Package:
Jdl.JdlPX;
Class name:
JdlPredictedReflectionsList
Class definition:
public class JdlPredictedReflectionsList
Extends:
Object
Implements:
JdlRotReflOutputHandler
Actions:
none

4.8.2.3 Accessible Fields

No fields with public, package or protected access defined.

4.8.2.4 Constructors

4.8.2.4.1 Introduction

Constructors are available to construct a JdlPredictedReflectionsList object with either a default capacity or a user specified capacity.

Constructors:

Default Constructor
Standard Constructor

4.8.2.4.2 Default Constructor

This constructs a JdlPredictedReflectionsList object with an initial capacity for 1000 reflections to be incremented in blocks of 1000 reflections as required.

Constructor Definition:
public JdlPredictedReflectionsList()
Parameters List:
none

4.8.2.4.3 Standard Constructor

This constructs a JdlPredictedReflectionsList object with a user specified initial capacity and a user specified increment if the list needs to be expanded.

Constructor Definition:
public JdlPredictedReflectionsList (int nr, int inc)
Parameters List:
nr
The initial capacity required (number of reflections).
inc
The increment in number of reflections required each time the list needs to be expanded.

4.8.2.5 Manipulate Reflection List

4.8.2.5.1 Introduction

This section has methods to clear the list and to add/delete/insert replace reflections in the list. It also includes a method to replace reflection indices when a relection is put into an asymmetric unit.

Methods:

Clear list - clearList
Add reflection - addReflection
Insert reflection - insertReflection
Replace reflection - replaceReflection
Delete reflection - deleteReflection
Delete reflections - deleteImageReflections
Put hkl - putHKL

4.8.2.5.2 Clear list - clearList

This method clears the reflections list (i.e. removes all entries though does not decrease its capacity).

Method Definition:
public void clearList()
Parameters List:
none

4.8.2.5.3 Add reflection - addReflection

This method adds a reflection to the end of the list.

Method Definition:
public void addReflection (JdlPredictedReflection refl)
Parameters List:
refl
The reflection to be added.

4.8.2.5.4 Insert reflection - insertReflection

This method inserts a reflection at a given position within the list.

Method Definition:
public void insertReflection (JdlPredictedReflection refl, int iref)
Parameters List:
refl
The reflection to be inserted.
iref
The position within the list where the reflection is to be inserted (reflection positions numbered from 1 upwards).

4.8.2.5.5 Replace reflection - replaceReflection

This method replaces a reflection at a given position within the list.

Method Definition:
public void replaceReflection (JdlPredictedReflection refl, int iref)
Parameters List:
refl
The reflection to replace a current reflection.
iref
The position within the list where the reflection is to be replaced (reflection positions numbered from 1 upwards).

4.8.2.5.6 Delete reflection - deleteReflection

This method deletes a reflection from the list.

Method Definition:
public void deleteReflection (int iref)
Parameters List:
iref
The position within the list of the reflection to be deleted (reflection positions numbered from 1 upwards).

4.8.2.5.7 Delete reflections - deleteImageReflections

This method deletes all reflections for a given image number.

Method Definition:
public void deleteImageReflections (int imgnum)
Parameters List:
imgnum
The image number of the image for which the reflections are to be deleted.

4.8.2.5.8 Put hkl - putHKL

This method replaces the current reflection indices with those required (normally those converted to an asymmetric unit) and sets the symmetry operator number (normally that required to convert the indices to those in the asymmetric unit). The other likely use is to reverse this procedure.

Method Definition:
public void putHKL (int iref, int h, int k, int l, int ksym)
Parameters List:
iref
The position within the list of the reflection for which the indices are to be reset (reflection positions numbered from 1 upwards).
h
The new 'h' index.
k
The new 'k' index.
l
The new 'l' index.
ksym
The symmetry operator number used to generate the indices or 0 to unset this item (see JdlPredictedReflection class for further details).

4.8.2.6 Get Reflection Data

4.8.2.6.1 Introduction

This section has methods to retrieve data from the reflection list.

Methods:

Get number of reflections - getNumberOfReflections
Get number of reflections - getNumberOfImageReflections
Get number of spatial overlaps - getNumberOfSpatialOverlaps
Get reflection reference - getReflection
Get reflection copy - getReflectionCopy
Get sort order - getSortOrder

4.8.2.6.2 Get number of reflections - getNumberOfReflections

This method returns the number of reflections currently in the reflection list.

Method Definition:
public int getNumberOfReflections()
Parameters List:
none
Method Return:
The number of reflections in the list.

4.8.2.6.3 Get number of reflections - getNumberOfImageReflections

This method returns the number of reflections currently in the reflection list for a selected crystal and image number.

Method Definition:
public int getNumberOfImageReflections(int icrys, int imgnum)
Parameters List:
icrys
The selected crystal number.
imgnum
The selected image number.
Method Return:
The number of reflections in the list for the requested crystal and image.

4.8.2.6.4 Get number of spatial overlaps - getNumberOfSpatialOverlaps

This method returns the number of spatially overlapped reflections currently in the reflection list for a selected crystal and image number. The spatial overlaps must have been calculated using the setSpatialOverlaps(..) method directly or via the predictReflections(..) method with 'spat' set to true;

Method Definition:
public int getNumberOfSpatialOverlaps(int icrys, int imgnum)
Parameters List:
icrys
The selected crystal number (-1 = all crystal numbers).
imgnum
The selected image number (-1 = all image numbers).
Method Return:
The number of reflections in the list for the requested crystal and image.

4.8.2.6.5 Get reflection reference - getReflection

This method returns a reference to the store JdlPredictedReflection object for a reflection at a selected position in the list.

Method Definition:
public JdlPredictedReflection getReflection (int iref)
Parameters List:
iref
The position in the list of the reflection to be returned (from 1 upwards).
Method Return:
The JdlPredictedReflection object for the reflection (reference to stored object - not a copy/clone).

4.8.2.6.6 Get reflection copy - getReflectionCopy

This method returns a copy of the JdlPredictedReflection object for a reflection at a selected position in the list.

Method Definition:
public JdlPredictedReflection getReflectionCopy (int iref)
Parameters List:
The
position in the list of the reflection to be returned (from 1 upwards).
Method Return:
A JdlPredictedReflection object for the reflection. This is a clone (copy) of the stored object.

4.8.2.6.7 Get sort order - getSortOrder

This method returns the current sort order.

Method Definition:
public int getSortOrder()
Parameters List:
none
Method Return:
The sort order:
= 1, Sorted on h, k, l
= 2, Sorted on local axis 1 coordinate
= 3, Sorted on local axis 2 coordinate
= 4, Sorted on h
= 5, Sorted on k
= 6, Sorted on l
= 0, May not be sorted.

4.8.2.7 Sort Reflection List

4.8.2.7.1 Introduction

This section has a single method to sort the reflection list using one of the available sort options.

Method:

Sort reflection list - sortReflectionList

4.8.2.7.2 Sort reflection list - sortReflectionList

This method sorts the reflection list based on the selected option.

Method Definition:
public void sortReflectionList (int srt_opt)
Parameters List:
sort_opt
Sort order option:
= 1, Sort on h, k and l
= 2, Sort on axis 1 coordinate
= 3, Sort on axis 2 coordinate
= 4, Sort on 'h'
= 5, Sort on 'k'
= 6, Sort on 'l'

4.8.2.8 Spatial Overlaps

4.8.2.8.1 Introduction

This section has a single method to set the spatial overlap flags for the reflections in the list.

Method:

Spatial overlaps - setSpatialOverlaps

4.8.2.8.2 Spatial overlaps - setSpatialOverlaps

This method determines the spatially overlapped reflections (and sets an internal flag) for the reflections of a given crystal and image. The overlap criterion is based on the given spot diameter. The number of spatially overlapped spots is returned.

Method Definition:
public int setSpatialOverlaps (int icrys, int img_id, double spotd)
Parameters List:
icrys
The selected crystal number.
img_id
The selected image number or identifier as stored when the spot list was predicted.
spotd
The spot diameter for the image im mm.
Method Return:
The number of spatially overlapped spots found for the image.

4.8.2.9 Predict Reflections

4.8.2.9.1 Introduction

This section has methods to calculate a predicted reflection list for the rotation method.

Methods:

Predict reflection list - predictReflections
Predict reflection list - predictReflections
Predict reflection set - predictReflectionSet
Predict reflection set - predictReflectionSet

4.8.2.9.2 Predict reflection list - predictReflections

This method predicts and stores a reflection list using the parameters stored in a JdlDiffractionDataModule object. Note that the image identifiers stored may be found from the range and image numbers using the JdlDiffractionDataModule.setImageID(..) method.

Method Definition:
public void predictReflections(JdlDiffractionDataModule ddm, int iset, int irange, int imgnum, boolean quick, boolean recorded, boolean spat, boolean append)
Parameters List:
ddm
The JdlDiffractionDataModule object containing the detector and crystal data.
iset
The set number within the Diffraction Data Module.
irange
The rotation range number.
imgnum
The number of the image from 1 up (within the requested rotation range) for which the prediction is to be carried out.
quick
If set to true a quick prediction will be carried out with fewer details being calculated for each reflection. If false the full detailed prediction will be performed (see the parameters of the JdlRotReflOutputHandler outputPredictedReflection(..) method for details of the items which are calculated.
recorded
If true, store only reflections flagged as being recorded. If false include predicted but non-recorded reflections.
spat
If true calculate spatial overlap flags after generating the reflection list, if false do not.
append
If true, append the reflections to any reflections already stored. If false clear any stored reflections before creating the list.

4.8.2.9.3 Predict reflection list - predictReflections

This method predicts and stores a reflection list using the parameters stored in JdlPositionedDetector and JdlPositionedCrystal objects. Note that the image identifiers stored may be found from the range and image numbers using the JdlDiffractionDataModule.setImageID(..) method.

Method Definition:
public void predictReflections(JdlPositionedDetector posdet, JdlPositionedCrystal poscrys, int icrys, int irange, double rotstart, double oscang, int imgnum, double rmin, double xmin, double xmax, double ymin, double ymax, boolean quick, boolean recorded, boolean spat, boolean append)
Parameters List:
posdet
A JdlPositionedDetector object containing details of the positioned detector, gonioneter and X-ray source.
poscrys
A JdlPositionedCrystal containing details of the crystal cell, symmetry and setting.
icrys
The crystal number (The image may be identified by the crystal number and image number).
irange
A rotation range number for which 'rotstart' is the start angle.
rotstart
The start rotation angle in degrees (see also imgnum).
oscang
The oscillation angle in degrees.
imgnum
The number of the image for which the prediction is to be carried out from 1 up (The rotation range used will be from rotstart + (imgnum-1)*oscang to rotstart + imgnum*oscang).
rmin
Minimum radius for prediction in mm.
xmin
Minimum 'x' limit for prediction in mm (ignored if xmin = xmax)
xmax
Maximum 'x' limit for prediction in mm (ignored if xmax = xmin)
ymin
Minimum 'y' limit for prediction in mm (ignored if ymin = ymax)
ymax
Maximum 'y' limit for prediction in mm (ignored if ymax = ymin)
quick
If set to true a quick prediction will be carried out with fewer details being calculated for each reflection. If false the full detailed prediction will be performed (see the parameters of the JdlRotReflOutputHandler outputPredictedReflection(..) method for details of the items which are calculated.
recorded
If true, store only reflections flagged as being recorded. If false include predicted but non-recorded reflections.
spat
If true calculate spatial overlap flags after generating the reflection list, if false do not.
append
If true, append the reflections to any reflections already stored. If false clear any stored reflections before creating the list.

4.8.2.9.4 Predict reflection set - predictReflectionSet

This method predicts and stores a reflection list using the parameters stored in a JdlDiffractionDataModule object. The prediction is carried out for a set of images covering a given rotation range. A fully detailed prediction is carried out and only the data for recorded reflections are stored. Note that the image identifiers stored may be found from the range and image numbers using the JdlDiffractionDataModule.setImageID(..) method. The generated reflections are added to any currently in the reflections list.

Method Definition:
public void predictReflectionSet(JdlDiffractionDataModule ddm, int iset, int irange, int setting_opt, boolean spat, JdlProgressHandler progress)
Parameters List:
ddm
The JdlDiffractionDataModule object containing the detector and crystal data.
iset
The set number within the Diffraction Data Module.
irange
The rotation range number.
setting_opt
This determines the exact setting parameters used for each image prediction:
= 0, Use the setting parameters defined for the first image of the complete dataset
= 1, Use the setting parameters defined for the first image of the specified range
= 2, Use the setting parameters defined for each individual image
Note that, in most cases, it is likely that the setting parameters for all images of the set will in fact be identical.
spat
If true calculate spatial overlap flags after generating the reflection list, if false do not.
progress
Progress handler (may be null if not required).

4.8.2.9.5 Predict reflection set - predictReflectionSet

This method predicts and stores a reflection list using the parameters stored in JdlPositionedDetector and JdlPositionedCrystal objects. The prediction is carried out for a set of images covering a given rotation range. A fully detailed prediction is carried out and only the data for recorded reflections are stored. Note that the image identifiers stored may be found from the range and image numbers using the JdlDiffractionDataModule.setImageID(..) method. The generated reflections are added to any currently in the reflections list.

Method Definition:
public void predictReflectionSet(JdlPositionedDetector posdet, JdlPositionedCrystal poscrys, int icrys, int irange, double rotstart, double rotend, double oscang, double rmin, double xmin, double xmax, double ymin, double ymax, boolean spat, JdlProgressHandler progress)
Parameters List:
posdet
A JdlPositionedDetector object containing details of the positioned detector, gonioneter and X-ray source.
poscrys
A JdlPositionedCrystal containing details of the crystal cell, symmetry and setting.
icrys
The crystal number (The image may be identified by the crystal number and image identifier).
irange
a range number > 0 to be associated with the given rotation range.
rotstart
The start rotation angle in degrees.
rotend
The end rotation angle in degrees.
oscang
The oscillation angle in degrees.
rmin
Minimum radius for prediction in mm.
xmin
Minimum 'x' limit for prediction in mm (ignored if xmin = xmax)
xmax
Maximum 'x' limit for prediction in mm (ignored if xmax = xmin)
ymin
Minimum 'y' limit for prediction in mm (ignored if ymin = ymax)
ymax
Maximum 'y' limit for prediction in mm (ignored if ymax = ymin)
spat
If true calculate spatial overlap flags for each image, if false do not.
progress
Progress handler (may be null if not required).

4.8.2.10 Convert Indices

4.8.2.10.1 Introduction

This section has methods to convert the reflection entries between measured and unique indices (+ symmetry number).

Methods:

Convert to unique - indicesToUnique
Convert to measured - indicesToMeasured

4.8.2.10.2 Convert to unique - indicesToUnique

This method converts the measured indices to unique indices + symmetry numbers. If a reflection has already been converted (symmetry number set), no action will be taken for that reflection.

Method Definition:
public boolean indicesToUnique (JdlSymmetry symm)
Parameters List:
symm
The symmetry (must be complete).
Method Return:
Returns true ik Ok, false if symmetry not complete.

4.8.2.10.3 Convert to measured - indicesToMeasured

This method converts the unique indices (+stored symmetry) to measured indices. If a reflection is not stored as unique (symmetry number not set), no action will be taken for that reflection.

Method Definition:
public boolean indicesToMeasured (JdlSymmetry symm)
Parameters List:
symm
The symmetry (must be complete).
Method Return:
Returns true ik Ok, false if symmetry not complete.

⇑ Up 2   ⇑ Up 1   ⇑ Top of this