Package xal.smf.impl
Class WireScanner.ScanConfig
java.lang.Object
xal.smf.scada.ScadaRecord
xal.smf.impl.profile.ParameterSet
xal.smf.impl.WireScanner.ScanConfig
- All Implemented Interfaces:
Cloneable,ProfileDevice.IProfileDomain,DataListener
- Enclosing class:
- WireScanner
public static class WireScanner.ScanConfig
extends ParameterSet
implements ProfileDevice.IProfileDomain
This class is a data structure for managing scan configuration
parameters.
- Since:
- Nov 9, 2009
- Author:
- Christopher K. Allen
-
Nested Class Summary
Nested classes/interfaces inherited from class xal.smf.scada.ScadaRecord
ScadaRecord.IFieldDescriptor -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doublethe numeric value 1/2-1/2intError flag indicating that the scan parameters are inconsistent, that is, they do not describe a viable scan.static final ScadaFieldMapThe map between structure field names and there corresponding descriptorsdoubleThe maximum position of the scan considering the current values ofposInit,stepLength, andstepCountdoubleThe stroke length of the device actuator.doubleThe initial (actuator) position of the scan in mm.intThe number of beam pulses (traces) used to compute a profile sample value.intThe total number of profile data samples in the scan data set.doubleThe size of each scan step in mm. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new, uninitializedScanConfigobject.Create a newScanConfigobject initialize with values fetched from the given device.ScanConfig(DataAdaptor daptSrc) Create a newScanConfigobject initialized from the given data source. -
Method Summary
Modifier and TypeMethodDescriptionstatic WireScanner.ScanConfigacquire(ProfileDevice ws) Return the set of profile scan configuration parameters.doubleReturn the left-most position of the projection interval, that is, the minimum valued endpoint.doubleReturn the length of the real interval containing the projection data.intReturns the number of signal samples in the profile data, that is, the number of data points in the domain.double[]Returns the locations within the domain interval where the profile data samples are taken.doubleReturns the stroke length of the actuator arm for a scan.Methods inherited from class xal.smf.impl.profile.ParameterSet
dataLabelMethods inherited from class xal.smf.scada.ScadaRecord
clone, getFieldDescriptor, getFieldDescriptorMap, getFieldDescriptors, loadHardwareValues, setFieldFromPV, setHardwareValues, setPvFromField, toString, update, write
-
Field Details
-
DBL_INV_SQRT_2
public static final double DBL_INV_SQRT_2the numeric value 1/2-1/2 -
FLD_MAP
The map between structure field names and there corresponding descriptors -
posInit
@Field(type=double.class, ctrl=true, hndRb="ScanCfgInitPosRb", hndSet="ScanCfgInitPosSet") public double posInitThe initial (actuator) position of the scan in mm. This is the actuator location where the data acquisition begins. The actuator initially moves to this location then begins the data scan at the specified scan rate. The data is taken between this value and that returned bycompFinalPosition(). -
stepCount
@Field(type=int.class, ctrl=true, hndRb="ScanCfgStepCntRb", hndSet="ScanCfgStepCntSet") public int stepCountThe total number of profile data samples in the scan data set. That is, the number of actuator steps during data acquisition. -
stepLength
@Field(type=double.class, ctrl=true, hndRb="ScanCfgStepLngRb", hndSet="ScanCfgStepLngSet") public double stepLengthThe size of each scan step in mm. That is, the distance between actuator positions for each profile data sample. -
pulseCount
@Field(type=int.class, ctrl=true, hndRb="ScanCfgStepPulsesRb", hndSet="ScanCfgStepPulsesSet") public int pulseCountThe number of beam pulses (traces) used to compute a profile sample value. Note that a value greater than 1 indicates averaging. Attempting to set the value less than 1 does nothing. -
lngScan
The maximum position of the scan considering the current values ofposInit,stepLength, andstepCount -
lngStroke
The stroke length of the device actuator. Thus, this is the maximum possible distance the wire can travel while taking data. It is a mechanical limitation.
The product ofstepLength×stepCountmust be less than this value. This is a read-only quantity. -
errScanRng
Error flag indicating that the scan parameters are inconsistent, that is, they do not describe a viable scan.
-
-
Constructor Details
-
ScanConfig
public ScanConfig()Create a new, uninitializedScanConfigobject.- Since:
- Nov 13, 2009
-
ScanConfig
Create a newScanConfigobject initialized from the given data source.- Parameters:
daptSrc- data source containing data structure fields- Since:
- Mar 17, 2010
-
ScanConfig
Create a newScanConfigobject initialize with values fetched from the given device.- Parameters:
ws- data acquisition device- Throws:
ConnectionException- unable to connect to a parameter read back channelGetException- general field initialization exception- Since:
- Dec 16, 2009
-
-
Method Details
-
acquire
public static WireScanner.ScanConfig acquire(ProfileDevice ws) throws ConnectionException, GetException Return the set of profile scan configuration parameters. The parameters are obtained from a call to channel access and returned the the scan parameter data structure.- Parameters:
ws- profile device under request- Returns:
- scan configuration for given profile device
- Throws:
ConnectionException- unable to connect parameter read back channelGetException- general channel access get exception- Since:
- Nov 9, 2009
-
getScanlLength
public double getScanlLength()Returns the stroke length of the actuator arm for a scan. This is the total physical distances traveled by the actuator arm during a scan and is not necessarily the abscissa of the measured data. This value, L, is typically given by the formula
L = Nsteps ΔL
where Nsteps is the number of scan steps and ΔL is the step length.- Returns:
- movement distance L of scan actuator
- Since:
- Oct 8, 2015
-
getSampleCount
Description copied from interface:ProfileDevice.IProfileDomainReturns the number of signal samples in the profile data, that is, the number of data points in the domain.- Specified by:
getSampleCountin interfaceProfileDevice.IProfileDomain- Parameters:
angle- the projection angle of the data set- Returns:
- number of data samples of the given angle
- Since:
- Apr 24, 2014
- See Also:
-
getSamplePositions
Description copied from interface:ProfileDevice.IProfileDomainReturns the locations within the domain interval where the profile data samples are taken.- Specified by:
getSamplePositionsin interfaceProfileDevice.IProfileDomain- Parameters:
angle- the projection angle of the data set- Returns:
- sample axis positions of the projection data
- Since:
- Apr 24, 2014
- See Also:
-
getInitialPosition
Description copied from interface:ProfileDevice.IProfileDomainReturn the left-most position of the projection interval, that is, the minimum valued endpoint.- Specified by:
getInitialPositionin interfaceProfileDevice.IProfileDomain- Parameters:
angle- the projection angle of the data set- Returns:
- left endpoint of the projection interval
- Since:
- Apr 24, 2014
- See Also:
-
getIntervalLength
Description copied from interface:ProfileDevice.IProfileDomainReturn the length of the real interval containing the projection data. That is, return the length of the smallest interval containing the projection data. Note that this value may be different than the "scan length" as it may depend upon the measurement plane. The value, L, is typically given by the formula
L = α Nsteps ΔL
where α is the correction factor, Nsteps is the number of scan steps, and ΔL is the step length. For example, if the scan actuator arm is physically at a 45 ° angle to the given measurement plane then α = 1/√2.- Specified by:
getIntervalLengthin interfaceProfileDevice.IProfileDomain- Parameters:
angle- the projection angle of the data set- Returns:
- length of the interval of definition for the given data set
- Since:
- Apr 24, 2014
- See Also:
-