Class MapToPolarAndIntegrate
java.lang.Object
uk.ac.diamond.scisoft.analysis.dataset.function.MapToPolarAndIntegrate
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionMapToPolarAndIntegrate(double x, double y, double sr, double sp, double er, double ep) Set up mapping of annular sector of 2D datasetMapToPolarAndIntegrate(double x, double y, double sr, double sp, double er, double ep, double dpp, boolean isDegrees) -
Method Summary
Modifier and TypeMethodDescriptionvoidsetClip(boolean clip) Set clipping compensation flagvoidsetDoAzimuthal(boolean doAzimuthal) Set flag controlling azimuthal profile calculationvoidsetDoErrors(boolean doErrors) Set flag controlling error estimate calculationvoidsetDoRadial(boolean doRadial) Set flag controlling radial profile calculationvoidsetInterpolate(boolean interpolate) Select between simple integration algorithm and the one using bilinear interpolationvoidsetMask(org.eclipse.january.dataset.Dataset mask) Set detector mask used sector profile calculationsvoidList<org.eclipse.january.dataset.Dataset> value(org.eclipse.january.dataset.IDataset... datasets) Wrapper call that selects the appropriate integration algorithm
-
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 xy- centre ysr- start radiussp- start phi in degreeser- end radiusep- 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
-
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:
valuein interfaceDatasetToDatasetFunction- Parameters:
datasets- input 2D dataset- Returns:
- 4 1D datasets for integral over radius, integral over azimuth (for given input and a uniform input)
-