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 Details

    • NewDetDistResolutionConverter

      public NewDetDistResolutionConverter()
  • Method Details

    • getDetDistInMM

      public double getDetDistInMM(double wavelengthInAngstroms, double resolutionInAngstroms) throws Exception
      Specified by:
      getDetDistInMM in interface IDetDistResolutionConverter
      Throws:
      Exception
    • getDetDistInMM

      public double getDetDistInMM(double wavelengthInAngstroms, double resolutionInAngstroms, double twoThetaDegrees) throws Exception
      Specified by:
      getDetDistInMM in interface IDetDistResolutionConverter
      Throws:
      Exception
    • getResInAngstroms

      public double getResInAngstroms(double wavelengthInAngstroms, double detDistanceInMillimetres) throws Exception
      Specified by:
      getResInAngstroms in interface IDetDistResolutionConverter
      Throws:
      Exception
    • getFullResInAngstroms

      public double getFullResInAngstroms(double wavelengthInAngstroms, double detDistanceInMillimetres) throws Exception
      Specified by:
      getFullResInAngstroms in interface IDetDistResolutionConverter
      Throws:
      Exception
    • getResInAngstroms

      public double getResInAngstroms(double wavelengthInAngstroms, double detDistanceInMillimetres, double twoThetaDegrees) throws Exception
      Specified by:
      getResInAngstroms in interface IDetDistResolutionConverter
      Throws:
      Exception
    • setDetector

      public void setDetector(Detector detector)
    • setDetDistToBeamXYConverter

      public void setDetDistToBeamXYConverter(IDetDistToBeamXYConverter detDistToBeamXYConverter)
    • setDetectorMaxDimension

      public void setDetectorMaxDimension(double detectorMaxDimension)
    • getDetectorMaxDimension

      public double getDetectorMaxDimension() throws DeviceException
      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 twoTheta
      twoThetaDegrees - : angle subtended (degrees) between beam and detector position (sum of angle of incidence and diffraction)
      Returns:
      calculated maximum resolution