dream3D has an extra row at start for grain based data

This commit is contained in:
Vitesh Shah 2021-01-11 14:21:56 +01:00
parent 028d47034d
commit dbab3c3a83
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ class ConfigMaterial(Config):
hdf = h5py.File(fname,'r')
config_info = ConfigMaterial() # empty yaml dictionary
orientation_path = path.join(root_dir,base_group,grain_data)
grain_orientations = np.array(hdf[orientation_path])
grain_orientations = np.array(hdf[orientation_path])[1:]
grain_quats = Rotation.from_Euler_angles(grain_orientations).as_quaternion()
material_dict = config_info.material_add(constituents={'phase':phase_name[0],'O':grain_quats},homogenization='SX')
material_dict.save()