Skip to content

Commit

Permalink
Renamed import_EBSD to textures
Browse files Browse the repository at this point in the history
  • Loading branch information
AHartmaier committed Feb 18, 2024
1 parent 4ddf5d7 commit 3f82efe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/kanapy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import_stats, write_stats
from kanapy.util import ROOT_DIR, MAIN_DIR, MTEX_DIR, WORK_DIR, log_level
try:
from kanapy.import_EBSD import EBSDmap, createOriset, createOrisetRandom,\
from kanapy.textures import EBSDmap, createOriset, createOrisetRandom,\
get_ipf_colors
MTEX_AVAIL = True
except:
Expand Down
4 changes: 2 additions & 2 deletions src/kanapy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def generate_orientations(self, data, ang=None, omega=None, Nbase=5000,
"""
from kanapy import MTEX_AVAIL
try:
from kanapy.import_EBSD import EBSDmap, createOrisetRandom, createOriset
from kanapy.textures import EBSDmap, createOrisetRandom, createOriset
except:
raise ImportError('Matlab or MTEX not installed properly. ' +
'Run "kanapy setupTexture" first to use this function.')
Expand Down Expand Up @@ -385,7 +385,7 @@ def plot_voxels(self, sliced=True, dual_phase=False, cmap='prism',
data = self.mesh.grains
if ori is not None:
try:
from kanapy.import_EBSD import get_ipf_colors
from kanapy.textures import get_ipf_colors
if type(ori) is bool and ori:
ori = np.array([val for val in self.mesh.grain_ori_dict.values()])
"""Create possibility to pass actual CS to MTEX"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_texture.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import numpy as np
import pytest
from kanapy import MAIN_DIR, MTEX_AVAIL
from kanapy.import_EBSD import EBSDmap, createOriset
from kanapy.textures import EBSDmap, createOriset

@pytest.mark.skipif(MTEX_AVAIL == False, reason="Kanapy is not configured for texture analysis yet!")
def test_readEBSD():
Expand All @@ -34,4 +34,4 @@ def test_createORI():
assert (np.abs(ori_rve[4, 0] - 0.1121997376282069) < 1.e-5)

if __name__ == "__main__":
pytest.main([__file__])
pytest.main([__file__])

0 comments on commit 3f82efe

Please sign in to comment.