Class NavigatorUtils

java.lang.Object
uk.ac.diamond.sda.navigator.util.NavigatorUtils

public class NavigatorUtils extends Object
  • Constructor Details

    • NavigatorUtils

      public NavigatorUtils()
  • Method Details

    • getScanCommand

      public static String getScanCommand(File file)
      Method that returns a Scan Command given a .nxs, .hdf5, .srs, .dat file
      Parameters:
      file -
      Returns:
      a Scan Command as a String
    • getASCIIScanCommand

      public static String getASCIIScanCommand(File file)
      Method that returns a Scan Command given a particular file
      Files with .dat and .srs extensions are supported. So are .nxs files.
      Parameters:
      file -
      Returns:
      a String value of the scan command
    • getHDF5TitlesAndScanCmds

      public static String[][] getHDF5TitlesAndScanCmds(String fullpath)
      Method that returns a matrix of String with scan commands and titles given the full path to a Nexus file.
      Make sure that the file path is the one of a Nexus file.
      Parameters:
      fullpath -
      Returns:
      a String array of Scan commands and Titles
    • getHDF5ScanCommand

      public static String getHDF5ScanCommand(String fullpath)
      Method that returns of the Scan Command of the nxs file being looked at.
      If there are more than one scan command, it returns the first one
      Parameters:
      fullpath -
      Returns:
      the Scan command as a String
    • getHDF5ScanCommand

      public static String getHDF5ScanCommand(String fullpath, GroupNode rootnode)
      Method that returns of the Scan Command of the nxs file being looked at.
      If there are more than one scan command, it returns the first one
      Parameters:
      fullpath -
      rootnode -
      Returns:
      the Scan command as a String
    • getHDF5Title

      public static String getHDF5Title(String fullpath)
    • getHDF5Title

      public static String getHDF5Title(String fullpath, GroupNode rootnode)
      Method that returns the title of the nxs file being looked at.
      If there are more than one title, it returns the first one
      Parameters:
      fullpath -
      rootnode -
      Returns:
      a String