def test_save_jana_with_no_lattice_information(self): peaks = CloneWorkspace(self._workspace) peaks.sample().clearOrientedLattice() file_name = os.path.join(self._test_dir, "test_jana_no_lattice.hkl") # Act SaveReflections(InputWorkspace=peaks, Filename=file_name, Format="Jana", SplitFiles=False)
def _create_indexed_workspace(self, fractional_peaks, m1m2): # Create table with the number of columns we need modulated = CloneWorkspace(fractional_peaks) lattice = modulated.sample().getOrientedLattice() lattice.setModVec1(V3D(0.5, 0.0, 0.5)) lattice.setModVec2(V3D(0.333, 0.333, 0.)) for row, peak in enumerate(modulated): row_indices = m1m2[row] peak.setIntMNP(V3D(row_indices[0], row_indices[1], 0)) return modulated
def _create_indexed_workspace(self, fractional_peaks, m1m2): # Create table with the number of columns we need modulated = CloneWorkspace(fractional_peaks) lattice = modulated.sample().getOrientedLattice() lattice.setModVec1(V3D(0.5, 0.0, 0.5)) lattice.setModVec2(V3D(0.333, 0.333, 0.)) for row, peak in enumerate(modulated): row_indices = m1m2[row] mnp = V3D(row_indices[0], row_indices[1], 0) peak.setIntMNP(mnp) # update hkl modvec = lattice.getModVec(0) * mnp[0] + lattice.getModVec(1) * mnp[1] hkl = peak.getHKL() + modvec peak.setHKL(hkl[0], hkl[1], hkl[2]) return modulated