Class NexusCalibrationExportUtils

java.lang.Object
uk.ac.diamond.scisoft.diffraction.powder.NexusCalibrationExportUtils

public class NexusCalibrationExportUtils extends Object
  • Constructor Details

    • NexusCalibrationExportUtils

      public NexusCalibrationExportUtils()
  • Method Details

    • saveToNexusFile

      public static void saveToNexusFile(org.eclipse.january.dataset.IDataset image, IDiffractionMetadata meta, IPowderCalibrationInfo info, String filepath) throws Exception
      Throws:
      Exception
    • saveToNexusFile

      public static void saveToNexusFile(org.eclipse.january.dataset.IDataset image, org.eclipse.january.dataset.IDataset position, IDiffractionMetadata meta, IPowderCalibrationInfo info, String filepath) throws Exception
      Throws:
      Exception
    • saveToMovingBeamCompatibleNexusFile

      public static void saveToMovingBeamCompatibleNexusFile(org.eclipse.january.dataset.IDataset image, org.eclipse.january.dataset.IDataset position, IDiffractionMetadata meta, IPowderCalibrationInfo info, String filepath, String xDatasetPath, String yDatasetPath) throws Exception
      Save a calibrated frame using a format compatible with moving beam operations. This format results in a link being established for the calibration_data group to the position at which the calibration was taken.

      For a moving beam, the xDatasetName and yDatasetName variables would be the motor position dataset paths for the raw axis motors recording the source axis movements, e.g. /entry/diffraction/kb_x for xDatasetPath, and /entry/diffraction/kb_y for yDatasetPath.

      Parameters:
      image - The calibrated frame to save in the file
      position - dataset containing the position information for the frame
      meta - Metadata containing the diffraction geometry
      info - Information on the calibration
      filepath - Location to which the file will be saved
      xDatasetPath - Path in the nexus file to store the source position x information
      yDatasetPath - Path in the nexus file to store the source position y information
      Throws:
      Exception
    • splitDatasetNameAndGroupPath

      public static String[] splitDatasetNameAndGroupPath(String fullPath)