From c4baca0cb6aa2391448e2f195760a6bf9d34e603 Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Thu, 4 May 2023 10:16:22 +0200 Subject: [PATCH] fixed typo --- python/damask/_result.py | 12 ++++++------ python/tests/test_Result.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/python/damask/_result.py b/python/damask/_result.py index 5343a3f0c..be09cbf35 100644 --- a/python/damask/_result.py +++ b/python/damask/_result.py @@ -1993,7 +1993,7 @@ class Result: phase_ID_array[at_cell_ph[c][label]] = count + 1 job_file_no_ext = self.fname.stem - o = h5py.File(f'{dream_dir}/{job_file_no_ext}_{inc}.dream3D','w') + o = h5py.File(f'{dream_dir}/{job_file_no_ext}_{inc}.dream3d','w') o.attrs['DADF5toDREAM3D'] = '1.0' o.attrs['FileVersion'] = '7.0' @@ -2009,14 +2009,14 @@ class Result: # Data eulers orientation_data = cell_orientation_array.astype(np.float32) - o[cell_data_label + '/EulersAngles'] = orientation_data.reshape(tuple(np.flip(self.cells))+(3,)) + o[cell_data_label + '/EulerAngles'] = orientation_data.reshape(tuple(np.flip(self.cells))+(3,)) # Attributes to CellData group o[cell_data_label].attrs['AttributeMatrixType'] = np.array([3],np.uint32) o[cell_data_label].attrs['TupleDimensions'] = np.array(self.cells,np.uint64) # Common Attributes for groups in CellData - for dataset in ['/Phases','/Eulers']: + for dataset in ['/Phases','/EulerAngles']: o[cell_data_label + dataset].attrs['DataArrayVersion'] = np.array([2],np.int32) o[cell_data_label + dataset].attrs['Tuple Axis Dimensions'] = 'x={},y={},z={}'.format(*np.array(self.cells)) @@ -2026,9 +2026,9 @@ class Result: o[cell_data_label + '/Phases'].attrs['TupleDimensions'] = np.array(self.cells,np.uint64) # Eulers attributes - o[cell_data_label + '/Eulers'].attrs['ComponentDimensions'] = np.array([3],np.uint64) - o[cell_data_label + '/Eulers'].attrs['ObjectType'] = 'DataArray' - o[cell_data_label + '/Eulers'].attrs['TupleDimensions'] = np.array(self.cells,np.uint64) + o[cell_data_label + '/EulerAngles'].attrs['ComponentDimensions'] = np.array([3],np.uint64) + o[cell_data_label + '/EulerAngles'].attrs['ObjectType'] = 'DataArray' + o[cell_data_label + '/EulerAngles'].attrs['TupleDimensions'] = np.array(self.cells,np.uint64) # Create EnsembleAttributeMatrix ensemble_label = data_container_label + '/CellEnsembleData' diff --git a/python/tests/test_Result.py b/python/tests/test_Result.py index b8c24ed1d..89220128e 100644 --- a/python/tests/test_Result.py +++ b/python/tests/test_Result.py @@ -439,9 +439,9 @@ class TestResult: result = Result(ref_path/fname).view(increments=0) #comparing the initial data only result.export_VTK(target_dir=tmp_path) - ref_file = h5py.File(ref_path/'2phase_irregularGrid.dream3D','r') + ref_file = h5py.File(ref_path/'2phase_irregularGrid.dream3d','r') job_file_no_ext = result.fname.stem - results_file = h5py.File(tmp_path/f'{job_file_no_ext}_increment_0.dream3D','r') + results_file = h5py.File(tmp_path/f'{job_file_no_ext}_increment_0.dream3d','r') error_messages = []