4.8.3 - Predicted Reflection - JdlPredictedReflection

John W. Campbell

4.8.3.1 Introduction

This class stores details of a predicted reflection (indices, detector position and other parameters calculated during a prediction). Most of the item values are accessible via public fields as well as via methods though a few are restricted to package access. The class implements the interfaces Cloneable and Comparable so that reflections may be copied and reflection lists sorted on indices or detector positions. If a 'quick' prediction was done, not all values will be set.

Class, fields, constructors and methods:

Class Details
Accessible Fields
Constructors
Set Parameters
Get Parameters
Sort Order

4.8.3.2 Class Details

Package:
Jdl.JdlPX;
Class name:
JdlPredictedReflection
Class definition:
public class JdlPredictedReflection
Extends:
Object
Implements:
Cloneable
Comparable
Comparator<JdlPredictedReflection>
Actions:
none

4.8.3.3 Accessible Fields

The following accessible fields have been defined:

public final static int HKL
Flag to sort on h, k and l indices (together).
public final static int AXIS1_COORDINATE
Flag to sort on local axis 1 coordinate.
public final static int AXIS2_COORDINATE
Flag to sort on local axis 2 coordinate.
public final static int H
Flag to sort on h index.
public final static int K
Flag to sort on k index.
public final static int L
Flag to sort on l index.
static int sort_option
public short h
'h' index.
public short k
'k' index.
public short l
'l' index.
public float ax1_coord
Axis 1 (e.g. x) detector coordinate (in mm).
public float ax2_coord
Axis 2 (e.g. y) detector coordinate (in mm).
public short recorded_status
Recorded reflection flag:
= 0, Not recorded
= 1, Fully recorded
= 2, Good partial (<= nwmax images)
= 3, Too-wide partial (> nwmax images)
= 4, Within cusp but part visible
= 100, Quick prediction - predicted but not categorised
public float phi
Phi value when reciprocal lattice point is on the Ewald sphere (in degrees).
public float phi_width
Reflection width (in degrees) - will not be set for a quick prediction.
public float lorentz_factor
Lorentz factor - will not be set for a quick prediction.
public short crystal_number
Crystal number >0 (0 if not set).
public int image_number
Image number (or identifier e.g. packed range & image no.) > 0 (0 if not set).
public short ksym
Symmetry no. 0=not defined (0 if measured/predicted indices stored) or set to the symmetry operator number if indices have been converted to the unique set)
float rotimg_start
Start angle for oscillation range being used
float[] xrlpe
Coordinates of reciprocal lattice point on Ewald sphere.
short nimg
No. of images over which spot spread:
= 1, Full spot - or quick prediction
= 0, Too wide (>nwmax images)
= - 1, Not set
short ifirst
First image for spot as an offset from the current image (set to 0 for a quick prediction). If nimg==-1 this will not be set.
byte inr_flag
Reflection not recorded flag:
= 0, Recorded (or a quick prediction)
= 1, On rotation axis
= 2, Within cusp
= 3, Outside extended resolution limit
= 4, Not-recorded but still in list
= -1, Not set
byte spatial_overlap
Spatial overlap flag:
= 1, Overlapped
= 0, Not overlapped
= -1, Not set

4.8.3.4 Constructors

4.8.3.4.1 Introduction

Constructors are available to construct a JdlPredictedReflection object with default (mostly unset) values or given a set of the main values required from a prediction. Where values are given, double and float versions are available.

Constructors:

Empty Constructor
Double Parameters Constructor
Float Parameters Constructor

4.8.3.4.2 Empty Constructor

This constructs a basically empty object with only the recorded status (set to 100 as for va quick prediction) and Lorenz factor (set to 1.0) being assigned non-zero values.

Constructor Definition:
public JdlPredictedReflection()
Parameters List:
none

4.8.3.4.3 Double Parameters Constructor

Constructor Definition:
public JdlPredictedReflection(int h, int k, int l, double ax1_coord, double ax2_coord, int rec_status, double phi, double phiw, double lorfac)
Parameters List:
h
The 'h' index.
k
The 'k' index.
l
The 'l' index.
ax1_coord
Axis 1 (e.g. x) detector coordinate (in mm).
ax2_coord
Axis 2 (e.g. y) detector coordinate (in mm).
rec_status
Recorded reflection flag:
= 0, Not recorded
= 1, Fully recorded
= 2, Good partial (<= nwmax images)
= 3, Too-wide partial (> nwmax images)
= 4, Within cusp but part visible
= 100, Quick prediction - predicted but not categorised
phi
Phi value when reciprocal lattice point is on the Ewald sphere (in degrees).
phiw
Reflection width (in degrees) - not set for a quick prediction.
lorfac
Lorentz factor.

4.8.3.4.4 Float Parameters Constructor

Constructor Definition:
public JdlPredictedReflection(short h, short k, short l, float ax1_coord, float ax2_coord, short rec_status, float phi, float phiw, float lorfac)
Parameters List:
h
The 'h' index.
k
The 'k' index.
l
The 'l' index.
ax1_coord
Axis 1 (e.g. x) detector coordinate (in mm).
ax2_coord
Axis 2 (e.g. y) detector coordinate (in mm).
rec_status
Recorded reflection flag:
= 0, Not recorded
= 1, Fully recorded
= 2, Good partial (<= nwmax images)
= 3, Too-wide partial (> nwmax images)
= 4, Within cusp but part visible
= 100, Quick prediction - predicted but not categorised
phi
Phi value when reciprocal lattice point is on the Ewald sphere (in degrees).
phiw
Reflection width (in degrees) - not set for a quick prediction.
lorfac
Lorentz factor.

4.8.3.5 Set Parameters

4.8.3.5.1 Introduction

This section has methods to set specific parameters or groups of parameters.

Methods:

Set indices - setIndices
Set indices - setIndices
Set coordinates - setCoordinates
Set recorded status - setRecordedStatus
Set phi - setPhi
Set Lorenz factor - setLorentzFactor
Set crystal number - setCrystalNumber
Set image number - setImageNumber
Set symmetry number - setSymmetryFlag
Set rotation image start - setRotationImageStart
Set reciprocal lattice coordinates - setRLCoordinates
Set non-recorded flag - setNotRecordedFlag
Set number of images - setNumberOfImages
Set spatial overlap - setSpatialOverlap

4.8.3.5.2 Set indices - setIndices

This method sets the values of the reflection indices given the three individual values.

Method Definition:
public void setIndices (int h, int k, int l)
Parameters List:
h
The 'h' index.
k
The 'k' index.
l
The 'l' index.

4.8.3.5.3 Set indices - setIndices

This method sets the values of the reflection indices held in an integer array.

Method Definition:
public void setIndices (int[] hkl)
Parameters List:
hkl
A three element array containing the reflection indices.

4.8.3.5.4 Set coordinates - setCoordinates

This method sets the predicted reflection coordinates on the detector.

Method Definition:
public void setCoordinates (double ax1_coord, double ax2_coord)
Parameters List:
ax1_coord
Axis 1 (e.g. x) detector coordinate (in mm).
ax2_coord
Axis 2 (e.g. y) detector coordinate (in mm).

4.8.3.5.5 Set recorded status - setRecordedStatus

This method sets the reflection recorded status flag.

Method Definition:
public void setRecordedStatus(int rec_status)
Parameters List:
rec_status
Recorded reflection flag:
= 0, Not recorded
= 1, Fully recorded
= 2, Good partial (<= nwmax images)
= 3, Too-wide partial (> nwmax images)
= 4, Within cusp but part visible
= 100, Quick prediction - predicted but not categorised

4.8.3.5.6 Set phi - setPhi

This method sets the phi angle and the phi width for the reflection.

Method Definition:
public void setPhi (double phi, double phi_width)
Parameters List:
phi
Phi value when reciprocal lattice point is on the Ewald sphere (in degrees).
phi_width
Reflection width (in degrees) - not set for a quick prediction.

4.8.3.5.7 Set Lorenz factor - setLorentzFactor

This method sets the reflection Lorenz factor.

Method Definition:
public void setLorentzFactor (double lorfac)
Parameters List:
lorfac
Lorentz factor.

4.8.3.5.8 Set crystal number - setCrystalNumber

This method sets the crystal number.

Method Definition:
public void setCrystalNumber (int icrys)
Parameters List:
icrys
The crystal number (>0, 0 = not set).

4.8.3.5.9 Set image number - setImageNumber

This method sets the image number.

Method Definition:
public void setImageNumber (int imgnum)
Parameters List:
imgnum
The image number (>0, 0 = not set).

4.8.3.5.10 Set symmetry number - setSymmetryFlag

This method sets the number of the symmetry operator required to put the reflection into the asymmetric unit.

Method Definition:
public void setSymmetryFlag (int ksym)
Parameters List:
ksym
The number of the symmetry operator (0=not defined (usually 0 if measured/predicted indices stored)) or set to symmetry the symmetry operator number if indices have been converted to the unique set).

4.8.3.5.11 Set rotation image start - setRotationImageStart

This method sets the start angle of the oscillation range used in this prediction.

Method Definition:
public void setRotationImageStart (double rotimg_start)
Parameters List:
rotimg_start
Start angle for oscillation range.

4.8.3.5.12 Set reciprocal lattice coordinates - setRLCoordinates

This method sets the values of the reciprocal lattice coordinates for the reflection.

Method Definition:
public void setRLCoordinates (double[] xr)
Parameters List:
xr
Array holding the reciprocal lattice x, y, z coordinates for the reflection.

4.8.3.5.13 Set non-recorded flag - setNotRecordedFlag

This method sets a flag with status information about non-recorded reflections.

Method Definition:
public void setNotRecordedFlag (int inr_flag)
Parameters List:
inr_flag
Status flag for non-recorded reflections:
= 0, Recorded (or a quick prediction)
= 1, On rotation axis
= 2, Within cusp
= 3, Outside extended resolution limit
= 4, Not-recorded but still in list
= -1, Not set

4.8.3.5.14 Set number of images - setNumberOfImages

This method sets the number of images over which the reflection is spread and the offset from the current image for the image in which the reflection starts.

Method Definition:
public void setNumberOfImages (int nimg, int ifirst)
Parameters List:
nimg
No. of images over which spot spread:
= 1, Full spot - or quick prediction
= 0, Too wide (>nwmax images)
= - 1, Not set
ifirst
First image for spot as an offset from the current image (set to 0 for a quick prediction).

4.8.3.5.15 Set spatial overlap - setSpatialOverlap

This method sets the value of the spatial overlap flag.

Method Definition:
public void setSpatialOverlap (int spov)
Parameters List:
spov
Spatial overlap flag:
= 1, Overlapped
= 0, Not overlapped
= -1, Not set

4.8.3.6 Get Parameters

4.8.3.6.1 Introduction

This section has methods to get the values of the stored parameters. The parameters are described in more detail, where appropriate, in the field definitions and in the descriptions of the methods which set the values.

Methods:

Get index h - getH
Get index k - getK
Get index l - getL
Get indices - getHKL
Get coordinates - getCoordinates
Get recorded status - getRecordedStatus
Get phi - getPhi
Get phi width - getPhiWidth
Get Lorentz factor - getLorentzFactor
Get crystal number - getCrystalNumber
Get image number - getImageNumber
Get symmetry number - getSymmetryFlag
Get rotation image start - getRotationImageStart
Get reciprocal lattice coordinates - getRLCoordinates
Get non-recorded flag - getNotRecordedFlag
Get number of images - getNumberOfImages
Get first image offset - getFirstImageOffset
Get spatial overlap - getSpatialOverlap

4.8.3.6.2 Get index h - getH

Returns the value of the 'h' index.

Method Definition:
public int getH()
Parameters List:
none
Method Return:
The 'h' index.

4.8.3.6.3 Get index k - getK

Returns the value of the 'k' index.

Method Definition:
public int getK()
Parameters List:
none
Method Return:
The 'k' index.

4.8.3.6.4 Get index l - getL

Returns the value of the 'l' index.

Method Definition:
public int getL()
Parameters List:
none
Method Return:
The 'l' index.

4.8.3.6.5 Get indices - getHKL

Return the reflection indices in an array.

Method Definition:
public void getHKL (int[] hkl)
Parameters List:
hkl
Integer array in which to return the indices.

4.8.3.6.6 Get coordinates - getCoordinates

Return the detector coordinates

Method Definition:
public JdlXY getCoordinates()
Parameters List:
none
Method Return:
The detector coordinates in mm.

4.8.3.6.7 Get recorded status - getRecordedStatus

This method returns the value of the recorded status flag.

Method Definition:
public int getRecordedStatus ()
Parameters List:
none
Method Return:
The recorded status flag.

4.8.3.6.8 Get phi - getPhi

Returns the predicted phi value for the reflection

Method Definition:
public double getPhi()
Parameters List:
none
Method Return:
The phi value.

4.8.3.6.9 Get phi width - getPhiWidth

Returns the predicted phi width value for the reflection

Method Definition:
public double getPhiWidth()
Parameters List:
none
Method Return:
The phi width value.

4.8.3.6.10 Get Lorentz factor - getLorentzFactor

Returns the value of the Lorentz factor for the reflection.

Method Definition:
public double getLorentzFactor()
Parameters List:
none
Method Return:
The Lorentz factor.

4.8.3.6.11 Get crystal number - getCrystalNumber

Returns the crystal number.

Method Definition:
public int getCrystalNumber ()
Parameters List:
none
Method Return:
The crystal number.

4.8.3.6.12 Get image number - getImageNumber

Returns the image number.

Method Definition:
public int getImageNumber ()
Parameters List:
none
Method Return:
The image number.

4.8.3.6.13 Get symmetry number - getSymmetryFlag

Returns the symmetry operator number flag.

Method Definition:
public int getSymmetryFlag ()
Parameters List:
none
Method Return:
The symmetry operator number.

4.8.3.6.14 Get rotation image start - getRotationImageStart

This method returns the start angle of the oscillation range used in this prediction.

Method Definition:
public double getRotationImageStart ()
Parameters List:
none
Method Return:
Start angle for oscillation range.

4.8.3.6.15 Get reciprocal lattice coordinates - getRLCoordinates

Returns the predicted reciprocal lattice coordinates.

Method Definition:
public void getRLCoordinates(double[] xr)
Parameters List:
xr
3 element array in which to return the reciprocal lattice coordinates.

4.8.3.6.16 Get non-recorded flag - getNotRecordedFlag

Returns the value of the non-recorded reflection status flag.

Method Definition:
public int getNotRecordedFlag ()
Parameters List:
none
Method Return:
The non-recorded status flag.

4.8.3.6.17 Get number of images - getNumberOfImages

Returns the of images over which the spot is spread (if set).

Method Definition:
public int getNumberOfImages ()
Parameters List:
none
Method Return:
The number of images.

4.8.3.6.18 Get first image offset - getFirstImageOffset

Returns the image offset, from the current image, of the first image on which the reflection was recorded.

Method Definition:
public int getFirstImageOffset()
Parameters List:
none
Method Return:
The image offset.

4.8.3.6.19 Get spatial overlap - getSpatialOverlap

Returns the value of the spatial overlap flag if set.

Method Definition:
public int getSpatialOverlap()
Parameters List:
none
Method Return:
The spatial overlap flag

4.8.3.7 Sort Order

4.8.3.7.1 Introduction

This section has methods to set and return the value of the flag which will determine the sort order of a reflection list if it is sorted.

Methods:

Set sort order - setSortOption
Get sort order - getSortOption

4.8.3.7.2 Set sort order - setSortOption

This method sets the required sort order flag.

Method Definition:
public static void setSortOption (int srt_opt)
Parameters List:
srt_opt
Flag to set the sort order:
= 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.3.7.3 Get sort order - getSortOption

This method returns the current value of the sort order flag. Note that it does not indicate, for example, that a reflection list has actually been sorted.

Method Definition:
public static int getSortOption()
Parameters List:
none
Method Return:
The sort order flag.

⇑ Up 2   ⇑ Up 1   ⇑ Top of this