Class NexusScanInfo

java.lang.Object
org.eclipse.dawnsci.nexus.NexusScanInfo

public class NexusScanInfo extends 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.
  • Constructor Details

    • NexusScanInfo

      public NexusScanInfo()
    • NexusScanInfo

      public NexusScanInfo(List<String> axisNames)
      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, where getOverallShape() 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, where
      invalid reference
      #getOverallOuter()
      has 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 as 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

      public Collection<String> getDeviceNames(NexusScanInfo.ScanRole scanRole)
    • setDetectorNames

      public void setDetectorNames(Collection<String> detectorNames)
    • getDetectorNames

      public Collection<String> getDetectorNames()
    • getScannableNames

      public Collection<String> getScannableNames()
    • setScannableNames

      public void setScannableNames(Collection<String> axisNames)
    • getPerPointMonitorNames

      public Collection<String> getPerPointMonitorNames()
    • setPerPointMonitorNames

      public void setPerPointMonitorNames(Collection<String> monitorNames)
    • getPerScanMonitorNames

      public Collection<String> getPerScanMonitorNames()
    • setPerScanMonitorNames

      public void setPerScanMonitorNames(Collection<String> metadataScannableNames)
    • getFilePath

      public String getFilePath()
    • setFilePath

      public void setFilePath(String filePath)
    • 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 as getOverallShape().
      Returns:
      shape of outer scan
    • setOuterShape

      public void setOuterShape(int... outerShape)
    • getScanCommand

      public String getScanCommand()
    • setScanCommand

      public void setScanCommand(String scanCommand)
    • getScanFieldNames

      public List<String> getScanFieldNames()
    • setScanFieldNames

      public void setScanFieldNames(List<String> scanFieldNames)
    • getCurrentScriptName

      public String getCurrentScriptName()
    • setCurrentScriptName

      public void setCurrentScriptName(String currentScriptName)
    • setCurrentScanIdentifier

      public void setCurrentScanIdentifier(int currentScanIdentifier)
    • getCurrentScanIdentifier

      public int getCurrentScanIdentifier()
    • getScanRole

      public NexusScanInfo.ScanRole getScanRole(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(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
    • toString

      public String toString()
      Overrides:
      toString in class Object