def as_h5(self, filename): ''' Write the reflection table as a HDF5 file. :param filename: The output filename ''' from dials.util.nexus_old import NexusFile handle = NexusFile(filename, 'w') handle.set_reflections(self) handle.close()
def from_h5(filename): ''' Read the reflections table from a HDF5 file. :param filename: The hdf5 filename :return: The reflection table ''' from dials.util.nexus_old import NexusFile handle = NexusFile(filename, 'r') self = handle.get_reflections() handle.close() return self
def as_h5(self, filename): """ Write the reflection table as a HDF5 file. :param filename: The output filename """ from dials.util.nexus_old import NexusFile handle = NexusFile(filename, "w") # Clean up any removed experiments from the identifiers map self.clean_experiment_identifiers_map() handle.set_reflections(self) handle.close()