Class MapToPolarAndIntegrate

java.lang.Object
uk.ac.diamond.scisoft.analysis.dataset.function.MapToPolarAndIntegrate
All Implemented Interfaces:
DatasetToDatasetFunction

public class MapToPolarAndIntegrate extends Object implements DatasetToDatasetFunction
Map and integrate a 2D dataset from Cartesian to Polar coordinates and return that remapped dataset and an unclipped unit version (for clipping compensation) Cartesian coordinate system is x from left to right and y from top to bottom on the display so corresponding polar coordinate is radius from centre and azimuthal angle clockwise from positive x axis
  • Constructor Summary

    Constructors
    Constructor
    Description
    MapToPolarAndIntegrate(double x, double y, double sr, double sp, double er, double ep)
    Set up mapping of annular sector of 2D dataset
    MapToPolarAndIntegrate(double x, double y, double sr, double sp, double er, double ep, double dpp, boolean isDegrees)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setClip(boolean clip)
    Set clipping compensation flag
    void
    setDoAzimuthal(boolean doAzimuthal)
    Set flag controlling azimuthal profile calculation
    void
    setDoErrors(boolean doErrors)
    Set flag controlling error estimate calculation
    void
    setDoRadial(boolean doRadial)
    Set flag controlling radial profile calculation
    void
    setInterpolate(boolean interpolate)
    Select between simple integration algorithm and the one using bilinear interpolation
    void
    setMask(org.eclipse.january.dataset.Dataset mask)
    Set detector mask used sector profile calculations
    void
    setQSpace(QSpace qSpace, XAxis axisType)
     
    List<org.eclipse.january.dataset.Dataset>
    value(org.eclipse.january.dataset.IDataset... datasets)
    Wrapper call that selects the appropriate integration algorithm

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MapToPolarAndIntegrate

      public MapToPolarAndIntegrate(double x, double y, double sr, double sp, double er, double ep)
      Set up mapping of annular sector of 2D dataset
      Parameters:
      x - centre x
      y - centre y
      sr - start radius
      sp - start phi in degrees
      er - end radius
      ep - end phi in degrees
    • MapToPolarAndIntegrate

      public MapToPolarAndIntegrate(double x, double y, double sr, double sp, double er, double ep, double dpp, boolean isDegrees)
      Parameters:
      x -
      y -
      sr -
      sp -
      er -
      ep -
      isDegrees -
  • Method Details

    • setQSpace

      public void setQSpace(QSpace qSpace, XAxis axisType)
    • setMask

      public void setMask(org.eclipse.january.dataset.Dataset mask)
      Set detector mask used sector profile calculations
      Parameters:
      mask -
    • setClip

      public void setClip(boolean clip)
      Set clipping compensation flag
      Parameters:
      clip -
    • setInterpolate

      public void setInterpolate(boolean interpolate)
      Select between simple integration algorithm and the one using bilinear interpolation
      Parameters:
      interpolate - if true use bilinear interpolation algorithm
    • setDoRadial

      public void setDoRadial(boolean doRadial)
      Set flag controlling radial profile calculation
      Parameters:
      doRadial - if true calculate radial profile
    • setDoAzimuthal

      public void setDoAzimuthal(boolean doAzimuthal)
      Set flag controlling azimuthal profile calculation
      Parameters:
      doAzimuthal - if true calculate azimuthal profile
    • setDoErrors

      public void setDoErrors(boolean doErrors)
      Set flag controlling error estimate calculation
      Parameters:
      doErrors - if true calculate error estimates
    • value

      public List<org.eclipse.january.dataset.Dataset> value(org.eclipse.january.dataset.IDataset... datasets)
      Wrapper call that selects the appropriate integration algorithm
      Specified by:
      value in interface DatasetToDatasetFunction
      Parameters:
      datasets - input 2D dataset
      Returns:
      4 1D datasets for integral over radius, integral over azimuth (for given input and a uniform input)