Class AbstractBoundingLineModel
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.AbstractBoundingLineModel
- All Implemented Interfaces:
INameable,IBoundingLineModel,IBoundsToFit,IMapPathModel,IScanPathModel,IScanPointGeneratorModel
- Direct Known Subclasses:
TwoAxisLinePointsModel,TwoAxisLineStepModel
public abstract class AbstractBoundingLineModel
extends AbstractMapModel
implements IBoundingLineModel, IBoundsToFit
-
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 TwoAxisLinePointsModelenforceShape(TwoAxisLineStepModel model) Turns a StepModel into an equivalent PointsModel.booleaninthashCode()booleanvoidsetBoundingLine(BoundingLine boundingLine) voidsetBoundsToFit(boolean boundsToFit) toString()Methods inherited from class org.eclipse.scanning.api.points.models.AbstractMapModel
getScannableNames, getUnits, getxAxisName, getxAxisUnits, getyAxisName, getyAxisUnits, setUnits, setxAxisName, setxAxisUnits, setyAxisName, setyAxisUnitsMethods inherited from class org.eclipse.scanning.api.points.models.AbstractPointsModel
addPropertyChangeListener, getSummary, isAlternating, isContinuous, removePropertyChangeListener, setAlternating, setContinuous, supportsAlternating, supportsContinuous, supportsRandomOffset, supportsVertical, updateFromPropertiesMapMethods 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, setxAxisName, setxAxisUnits, setyAxisName, 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, updateFromPropertiesMap
-
Constructor Details
-
AbstractBoundingLineModel
protected AbstractBoundingLineModel()
-
-
Method Details
-
getBoundingLine
- Specified by:
getBoundingLinein interfaceIBoundingLineModel
-
setBoundingLine
- Specified by:
setBoundingLinein interfaceIBoundingLineModel
-
isBoundsToFit
public boolean isBoundsToFit()- Specified by:
isBoundsToFitin interfaceIBoundsToFit
-
setBoundsToFit
public void setBoundsToFit(boolean boundsToFit) - Specified by:
setBoundsToFitin interfaceIBoundsToFit
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractMapModel
-
equals
- Overrides:
equalsin classAbstractMapModel
-
toString
- Overrides:
toStringin classAbstractMapModel
-
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 divison to find the number of points using BigDecimal. The BoundingLine 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 line is equivalent in terms of point placement.- Parameters:
model- - a TwoAxisLineStepModel- Returns:
- pointsModel - a TwoAxisLinePointsModel that will output IPositions that very closely match the IPositions generated by the input
-