Package org.eclipse.dawnsci.nexus
Class NexusScanInfo
java.lang.Object
org.eclipse.dawnsci.nexus.NexusScanInfo
This class represents information about the scan which the NeXus device is running in.
For instance, names of scannables in the axes and the rank of the scan.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint[]createChunk(boolean append, int... datashape) Attempts to make a chunk size from the scan.int[]createChunk(int... datashape) intgetDeviceNames(NexusScanInfo.ScanRole scanRole) longintReturns the outer rank of the scan, not including any dimensions controlled by malcolm.int[]Returns the shape of the outer scan, not including any dimensions controlled by malcolm.intReturns the overall rank of the scan, including any dimensions controlled by malcolm.int[]Returns the overall shape of the scan, including any dimensions controlled by malcolm.getScanRole(String name) Returns theNexusScanInfo.ScanRoleof the device with the given name within the scan.voidsetCurrentScanIdentifier(int currentScanIdentifier) voidsetCurrentScriptName(String currentScriptName) voidsetDetectorNames(Collection<String> detectorNames) voidsetEstimatedScanTime(long estimatedScanTime) voidsetFilePath(String filePath) voidsetOuterShape(int... outerShape) voidsetOverallShape(int... overallShape) voidsetPerPointMonitorNames(Collection<String> monitorNames) voidsetPerScanMonitorNames(Collection<String> metadataScannableNames) voidsetScanCommand(String scanCommand) voidsetScanFieldNames(List<String> scanFieldNames) voidsetScannableNames(Collection<String> axisNames) voidsetShape(int... shape) toString()booleanwriteDataPerScan(String name) Returns whether the device with the given name should write its data once for the whole scan, or
-
Constructor Details
-
NexusScanInfo
public NexusScanInfo() -
NexusScanInfo
- Parameters:
axisNames- must be ordered correctly into indices
-
-
Method Details
-
getOverallRank
public int getOverallRank()Returns the overall rank of the scan, including any dimensions controlled by malcolm. Note that for an acquire scan, wheregetOverallShape()has a length of 0, this will return 1, as this is the rank of the datasets to be written.- Returns:
- rank of overall scan
-
getOuterRank
public int getOuterRank()Returns the outer rank of the scan, not including any dimensions controlled by malcolm. Note that for an acquire scan, wherehas a length of 0, this will return 1, as this is the rank of the datasets to be written. For non-malcolm scans this will return the same value asinvalid reference
#getOverallOuter()getOverallRank().- Returns:
- rank of outer scan
-
setEstimatedScanTime
public void setEstimatedScanTime(long estimatedScanTime) - Parameters:
estimatedScanTime- in milliseconds
-
getEstimatedScanTime
public long getEstimatedScanTime()- Returns:
- estimatedScanTime in milliseconds
-
getDeviceNames
-
setDetectorNames
-
getDetectorNames
-
getScannableNames
-
setScannableNames
-
getPerPointMonitorNames
-
setPerPointMonitorNames
-
getPerScanMonitorNames
-
setPerScanMonitorNames
-
getFilePath
-
setFilePath
-
getOverallShape
public int[] getOverallShape()Returns the overall shape of the scan, including any dimensions controlled by malcolm.- Returns:
- overall scan shape
-
setOverallShape
public void setOverallShape(int... overallShape) -
setShape
public void setShape(int... shape) -
getOuterShape
public int[] getOuterShape()Returns the shape of the outer scan, not including any dimensions controlled by malcolm. For non-malcolm scans this method will return the same value asgetOverallShape().- Returns:
- shape of outer scan
-
setOuterShape
public void setOuterShape(int... outerShape) -
getScanCommand
-
setScanCommand
-
getScanFieldNames
-
setScanFieldNames
-
getCurrentScriptName
-
setCurrentScriptName
-
setCurrentScanIdentifier
public void setCurrentScanIdentifier(int currentScanIdentifier) -
getCurrentScanIdentifier
public int getCurrentScanIdentifier() -
getScanRole
Returns theNexusScanInfo.ScanRoleof the device with the given name within the scan. If the device is not in the scanNexusScanInfo.ScanRole.NONEis returned.- Parameters:
name- name of device- Returns:
- role or device within scan, never
null
-
writeDataPerScan
Returns whether the device with the given name should write its data once for the whole scan, or- Parameters:
name-- Returns:
-
createChunk
public int[] createChunk(int... datashape) -
createChunk
public int[] createChunk(boolean append, int... datashape) Attempts to make a chunk size from the scan. NOTE This assumes that the datashape is a resonable size currently. If the datashape is small, the chunking can become too small to usefully read.- Parameters:
datashape-- Returns:
- the suggested chunk array
-
toString
-