Class AbstractPointsModel
java.lang.Object
org.eclipse.scanning.api.AbstractNameable
org.eclipse.scanning.api.points.models.AbstractPointsModel
- All Implemented Interfaces:
INameable,IScanPathModel,IScanPointGeneratorModel
- Direct Known Subclasses:
AbstractAxialStepModel,AbstractMapModel,AbstractMultiModel,AxialArrayModel,AxialPointsModel,JythonGeneratorModel,OneAxisPointRepeatedModel,StaticModel
public abstract class AbstractPointsModel
extends AbstractNameable
implements IScanPointGeneratorModel
Abstract base class for models using the ScanPointGenerator module, providing property change support for the convenience of subclasses.
Models should correlate to a Generator or series of Generator from ScanPointGenerator, that are valid targets for CompoundGenerators.
A Generator must be able to produce from a Model its Axes, Units (of length 1 or length number of axes), size and whether it should alternate in
upper dimensions.
Additionally, if the model is capable of acting continuously [the Generator has a prepare_bounds method] then the generator should pass
this argument from the model to the CompoundGenerator that will wrap the Generator.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected final PropertyChangeSupport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidProperty change supportbooleanThe names of the axes which will be scanned by this model.getUnits()inthashCode()booleanThis setting only makes sense when there is another model outside of this model within a CompoundModel: e.g.booleanIftruethe scan is continuous if possible, i.e.voidProperty change supportvoidsetAlternating(boolean alternating) voidsetContinuous(boolean newValue) voidstatic booleansupportsAlternating(Class<? extends IScanPointGeneratorModel> model) static booleansupportsContinuous(Class<? extends IScanPointGeneratorModel> model) static booleansupportsRandomOffset(Class<? extends IScanPointGeneratorModel> model) static booleansupportsVertical(Class<? extends IScanPointGeneratorModel> model) toString()voidupdateFromPropertiesMap(Map<String, Object> properties) Methods inherited from class org.eclipse.scanning.api.AbstractNameable
getName, setName
-
Field Details
-
HARDCODED_UNITS
- See Also:
-
pcs
-
-
Constructor Details
-
AbstractPointsModel
public AbstractPointsModel()
-
-
Method Details
-
addPropertyChangeListener
Description copied from interface:IScanPathModelProperty change support- Specified by:
addPropertyChangeListenerin interfaceIScanPathModel- Parameters:
listener-
-
removePropertyChangeListener
Description copied from interface:IScanPathModelProperty change support- Specified by:
removePropertyChangeListenerin interfaceIScanPathModel- Parameters:
listener-
-
getScannableNames
Description copied from interface:IScanPathModelThe names of the axes which will be scanned by this model.- Specified by:
getScannableNamesin interfaceIScanPathModel- Returns:
-
getSummary
-
isContinuous
public boolean isContinuous()Description copied from interface:IScanPointGeneratorModelIftruethe scan is continuous if possible, i.e. the motors continue to move while the detectors are exposed, iffalsethe motors stop at each point for the detectors are exposed. For a scan to be continous, generally it must done by malcolm device, i.e. for a GDA point of view the scan contains exactly one runnable device and that must be a malcolm device. Additionally continuous scanning is only possible for certain path models, e.g.TwoAxisGridPointsModel, where even then the scan will only be continuous in the fast axis, and step in the slow axis, where the x-axis is the fast axis by default.- Specified by:
isContinuousin interfaceIScanPointGeneratorModel- Returns:
trueif the scan should be continuous,falseotherwise.
-
setContinuous
public void setContinuous(boolean newValue) - Specified by:
setContinuousin interfaceIScanPointGeneratorModel
-
getUnits
- Specified by:
getUnitsin interfaceIScanPointGeneratorModel
-
setUnits
- Specified by:
setUnitsin interfaceIScanPointGeneratorModel
-
isAlternating
public boolean isAlternating()Description copied from interface:IScanPointGeneratorModelThis setting only makes sense when there is another model outside of this model within a CompoundModel: e.g. a StepModel in Energy outside of a Spiral in x, y will run the points of the Spiral backwards every alternate step of Energy, preventing having to return to starting positions of that scan. In the special case of Grid shaped scans both axes of the scan alternate, so it runs: bottom left -> bottom right -> top right -> top left, top left -> top right...- Specified by:
isAlternatingin interfaceIScanPointGeneratorModel- Returns:
trueif the scan is a alternating,falseotherwise
-
setAlternating
public void setAlternating(boolean alternating) - Specified by:
setAlternatingin interfaceIScanPointGeneratorModel
-
updateFromPropertiesMap
- Specified by:
updateFromPropertiesMapin interfaceIScanPointGeneratorModel
-
supportsAlternating
-
supportsContinuous
-
supportsRandomOffset
-
supportsVertical
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractNameable
-
equals
- Overrides:
equalsin classAbstractNameable
-
toString
- Overrides:
toStringin classAbstractNameable
-