generated.docs.javadoc.org.eclipse.dawnsci.nexus.NexusScanInfo.html Maven / Gradle / Ivy
NexusScanInfo (h5jan API)
org.eclipse.dawnsci.nexus
Class NexusScanInfo
- java.lang.Object
-
- org.eclipse.dawnsci.nexus.NexusScanInfo
-
public class NexusScanInfo
extends java.lang.Object
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.
TODO mattd 2017-02-28: should this class be removed and we use ScanInformation / ScanModel instead?
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
static class
NexusScanInfo.NexusRole
static class
NexusScanInfo.ScanRole
-
Constructor Summary
Constructors
Constructor and Description
NexusScanInfo()
NexusScanInfo(java.util.List<java.lang.String> axisNames)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
Modifier and Type
Method and Description
int[]
createChunk(boolean append,
int... datashape)
Attempts to make a chunk size from the scan.
int[]
createChunk(int... datashape)
static SliceND
createLocation(ILazyWriteableDataset context,
java.util.Collection<java.lang.String> names,
java.util.Map<java.lang.String,java.lang.Integer> indices,
int... datashape)
Deprecated.
java.util.Collection<java.lang.String>
getDetectorNames()
java.util.Collection<java.lang.String>
getDeviceNames(NexusScanInfo.ScanRole scanRole)
java.lang.String
getFilePath()
java.util.Set<java.lang.String>
getPerPointMonitorNames()
java.util.Set<java.lang.String>
getPerScanMonitorNames()
int
getRank()
java.util.List<java.lang.String>
getScannableNames()
NexusScanInfo.ScanRole
getScanRole(java.lang.String name)
Returns the NexusScanInfo.ScanRole
of the device with the given name within the scan.
int[]
getShape()
void
setDetectorNames(java.util.Set<java.lang.String> detectorNames)
void
setFilePath(java.lang.String filePath)
void
setPerPointMonitorNames(java.util.Set<java.lang.String> monitorNames)
void
setPerScanMonitorNames(java.util.Set<java.lang.String> metadataScannableNames)
void
setRank(int rank)
void
setScannableNames(java.util.List<java.lang.String> axisNames)
void
setShape(int[] shape)
java.lang.String
toString()
boolean
writeDataPerScan(java.lang.String name)
Returns whether the device with the given name should write its data
once for the whole scan, or
-
-
Constructor Detail
-
NexusScanInfo
public NexusScanInfo()
-
NexusScanInfo
public NexusScanInfo(java.util.List<java.lang.String> axisNames)
- Parameters:
axisNames
- must be ordered correctly into indices
-
Method Detail
-
getRank
public int getRank()
-
setRank
public void setRank(int rank)
-
getDeviceNames
public java.util.Collection<java.lang.String> getDeviceNames(NexusScanInfo.ScanRole scanRole)
-
setDetectorNames
public void setDetectorNames(java.util.Set<java.lang.String> detectorNames)
-
getDetectorNames
public java.util.Collection<java.lang.String> getDetectorNames()
-
getScannableNames
public java.util.List<java.lang.String> getScannableNames()
-
setScannableNames
public void setScannableNames(java.util.List<java.lang.String> axisNames)
-
getPerPointMonitorNames
public java.util.Set<java.lang.String> getPerPointMonitorNames()
-
setPerPointMonitorNames
public void setPerPointMonitorNames(java.util.Set<java.lang.String> monitorNames)
-
getPerScanMonitorNames
public java.util.Set<java.lang.String> getPerScanMonitorNames()
-
setPerScanMonitorNames
public void setPerScanMonitorNames(java.util.Set<java.lang.String> metadataScannableNames)
-
getFilePath
public java.lang.String getFilePath()
-
setFilePath
public void setFilePath(java.lang.String filePath)
-
getShape
public int[] getShape()
-
setShape
public void setShape(int[] shape)
-
getScanRole
public NexusScanInfo.ScanRole getScanRole(java.lang.String name)
Returns the NexusScanInfo.ScanRole
of the device with the given name within the scan. If the device
is not in the scan NexusScanInfo.ScanRole.NONE
is returned.
- Parameters:
name
- name of device
- Returns:
- role or device within scan, never
null
-
writeDataPerScan
public boolean writeDataPerScan(java.lang.String name)
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
-
createLocation
@Deprecated
public static SliceND createLocation(ILazyWriteableDataset context,
java.util.Collection<java.lang.String> names,
java.util.Map<java.lang.String,java.lang.Integer> indices,
int... datashape)
Deprecated.
Create a location for a slice of data from the list (correctly ordered) of
scan names and thier relative indices. This information is available from the
IPosition which is sent into the device during the scan.
- Parameters:
context
- LazyDataset we are writing to
names
- available from the IPosition for instance
indices
- available from the IPosition for instance
datashape
- shape of data that the device is adding to the nD stack
- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object