Class AbstractTwoAxisGridModel
java.lang.Object
org.eclipse.scanning.api.AbstractNameable
org.eclipse.scanning.api.points.models.AbstractPointsModel
org.eclipse.scanning.api.points.models.AbstractMapModel
org.eclipse.scanning.api.points.models.AbstractBoundingBoxModel
org.eclipse.scanning.api.points.models.AbstractTwoAxisGridModel
- All Implemented Interfaces:
INameable,IBoundingBoxModel,IBoundsToFit,IMapPathModel,IScanPathModel,IScanPointGeneratorModel
- Direct Known Subclasses:
AbstractOverlapModel,TwoAxisGridPointsModel,TwoAxisGridStepModel
public abstract class AbstractTwoAxisGridModel
extends AbstractBoundingBoxModel
implements IBoundsToFit
Abstract superclass for models representing a raster scan within a rectangular box in two-dimensional space.
Previously AbstractGridModel
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.eclipse.scanning.api.points.models.AbstractPointsModel
HARDCODED_UNITS, pcsFields inherited from interface org.eclipse.scanning.api.points.models.IBoundsToFit
PROPERTY_DEFAULT_BOUNDS_FIT, PROPERTY_NAME_BOUNDS_TO_FIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TwoAxisGridPointsModelenforceShape(TwoAxisGridStepModel model) Turns a StepModel into an equivalent PointsModel.booleanBy default the horizontal axis is the scanned first, i.e.inthashCode()booleanbooleanbooleanvoidsetAlternateBothAxes(boolean alternateBothAxes) voidsetBoundsToFit(boolean boundsToFit) voidsetOrientation(AbstractTwoAxisGridModel.Orientation orientation) toString()voidupdateFromPropertiesMap(Map<String, Object> properties) Methods inherited from class org.eclipse.scanning.api.points.models.AbstractBoundingBoxModel
getBoundingBox, setBoundingBox, setxAxisName, setyAxisNameMethods inherited from class org.eclipse.scanning.api.points.models.AbstractMapModel
getScannableNames, getUnits, getxAxisName, getxAxisUnits, getyAxisName, getyAxisUnits, setUnits, setxAxisUnits, setyAxisUnitsMethods inherited from class org.eclipse.scanning.api.points.models.AbstractPointsModel
addPropertyChangeListener, getSummary, isAlternating, isContinuous, removePropertyChangeListener, setAlternating, setContinuous, supportsAlternating, supportsContinuous, supportsRandomOffset, supportsVerticalMethods inherited from class org.eclipse.scanning.api.AbstractNameable
getName, setNameMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.scanning.api.points.models.IBoundsToFit
defaultBoundsToFitMethods inherited from interface org.eclipse.scanning.api.points.models.IMapPathModel
getxAxisName, getxAxisUnits, getyAxisName, getyAxisUnits, setxAxisUnits, setyAxisUnitsMethods inherited from interface org.eclipse.scanning.api.points.models.IScanPathModel
addPropertyChangeListener, getScannableNames, removePropertyChangeListenerMethods inherited from interface org.eclipse.scanning.api.points.models.IScanPointGeneratorModel
getUnits, isAlternating, isContinuous, setAlternating, setContinuous, setUnits
-
Constructor Details
-
AbstractTwoAxisGridModel
protected AbstractTwoAxisGridModel()
-
-
Method Details
-
getOrientation
By default the horizontal axis is the scanned first, i.e. is the fast axis. If this property is set the vertical axis is the scanned first.- Returns:
trueif the vertical axis is scanned first,falseif the horizontal axis is scanned first.
-
setOrientation
-
isVerticalOrientation
public boolean isVerticalOrientation() -
isBoundsToFit
public boolean isBoundsToFit()- Specified by:
isBoundsToFitin interfaceIBoundsToFit
-
setBoundsToFit
public void setBoundsToFit(boolean boundsToFit) - Specified by:
setBoundsToFitin interfaceIBoundsToFit
-
updateFromPropertiesMap
- Specified by:
updateFromPropertiesMapin interfaceIScanPointGeneratorModel- Overrides:
updateFromPropertiesMapin classAbstractPointsModel
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractBoundingBoxModel
-
equals
- Overrides:
equalsin classAbstractBoundingBoxModel
-
toString
- Overrides:
toStringin classAbstractBoundingBoxModel
-
enforceShape
Turns a StepModel into an equivalent PointsModel. Some scans (e.g XANES) perform similar scans but with small offsets, which can catch on floating point calculation errors, giving off-by-one in dataset shapes when reconstructing. This utility method prevents this situation by converting to a PointsModel, which will always have the same shape, and performing the division to find the number of points using BigDecimal. The BoundingBox of the returned model may differ from that of the input method, due to StepModels being able to leave a portion of a step towards their end too small for another step. PointsModel however use the entire region, so this partial box is equivalent in terms of point placement.- Parameters:
model- - a TwoAxisGridStepModel- Returns:
- pointsModel - a TwoAxisGridPointsModel that will output IPositions that very closely match the IPositions generated by the input
-
isAlternateBothAxes
public boolean isAlternateBothAxes() -
setAlternateBothAxes
public void setAlternateBothAxes(boolean alternateBothAxes)
-