Package gda.px.util
Class NewDetDistResolutionConverter
java.lang.Object
gda.factory.FindableBase
gda.px.util.NewDetDistResolutionConverter
- All Implemented Interfaces:
Findable,IDetDistResolutionConverter
@ServiceInterface(IDetDistResolutionConverter.class)
public final class NewDetDistResolutionConverter
extends FindableBase
implements IDetDistResolutionConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublecalcRes(double wavelengthInAngstroms, double thetaDegrees) Base definition of maximum resolution (from Bragg's Law with n=1)static doublecalcRes(double wavelengthInAngstroms, double radius, double distance, double twoThetaDegrees) Calculate maximum resolution given detector distance and extent (radius) that detector face extends No correction for position of beam centre on detector face at twoTheta=0 Here radius and distance parameters can be in any length unit, provided it is the same, millimetres is the conventiondoublegetDetDistInMM(double wavelengthInAngstroms, double resolutionInAngstroms) doublegetDetDistInMM(double wavelengthInAngstroms, double resolutionInAngstroms, double twoThetaDegrees) doubledoubledoublegetFullResInAngstroms(double wavelengthInAngstroms, double detDistanceInMillimetres) doublegetResInAngstroms(double wavelengthInAngstroms, double detDistanceInMillimetres) doublegetResInAngstroms(double wavelengthInAngstroms, double detDistanceInMillimetres, double twoThetaDegrees) voidsetDetDistToBeamXYConverter(IDetDistToBeamXYConverter detDistToBeamXYConverter) voidsetDetector(Detector detector) voidsetDetectorMaxDimension(double detectorMaxDimension) Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setName
-
Constructor Details
-
NewDetDistResolutionConverter
public NewDetDistResolutionConverter()
-
-
Method Details
-
getDetDistInMM
public double getDetDistInMM(double wavelengthInAngstroms, double resolutionInAngstroms) throws Exception - Specified by:
getDetDistInMMin interfaceIDetDistResolutionConverter- Throws:
Exception
-
getDetDistInMM
public double getDetDistInMM(double wavelengthInAngstroms, double resolutionInAngstroms, double twoThetaDegrees) throws Exception - Specified by:
getDetDistInMMin interfaceIDetDistResolutionConverter- Throws:
Exception
-
getResInAngstroms
public double getResInAngstroms(double wavelengthInAngstroms, double detDistanceInMillimetres) throws Exception - Specified by:
getResInAngstromsin interfaceIDetDistResolutionConverter- Throws:
Exception
-
getFullResInAngstroms
public double getFullResInAngstroms(double wavelengthInAngstroms, double detDistanceInMillimetres) throws Exception - Specified by:
getFullResInAngstromsin interfaceIDetDistResolutionConverter- Throws:
Exception
-
getResInAngstroms
public double getResInAngstroms(double wavelengthInAngstroms, double detDistanceInMillimetres, double twoThetaDegrees) throws Exception - Specified by:
getResInAngstromsin interfaceIDetDistResolutionConverter- Throws:
Exception
-
setDetector
-
setDetDistToBeamXYConverter
-
setDetectorMaxDimension
public void setDetectorMaxDimension(double detectorMaxDimension) -
getDetectorMaxDimension
- Throws:
DeviceException
-
getDetectorMaxFullDimension
public double getDetectorMaxFullDimension() -
calcRes
public static double calcRes(double wavelengthInAngstroms, double thetaDegrees) Base definition of maximum resolution (from Bragg's Law with n=1)- Parameters:
wavelengthInAngstroms-thetaDegrees- : incident angle to crystal plane (in degrees)- Returns:
- calculated maximum resolution
-
calcRes
public static double calcRes(double wavelengthInAngstroms, double radius, double distance, double twoThetaDegrees) Calculate maximum resolution given detector distance and extent (radius) that detector face extends No correction for position of beam centre on detector face at twoTheta=0 Here radius and distance parameters can be in any length unit, provided it is the same, millimetres is the convention- Parameters:
wavelengthInAngstroms-radius- : deviation (mm) from twoTheta subtended by detector (centre to edge)distance- : displacement (mm) from sample at centre of rotation to centre of detector at angle twoThetatwoThetaDegrees- : angle subtended (degrees) between beam and detector position (sum of angle of incidence and diffraction)- Returns:
- calculated maximum resolution
-