Skip to content

Commit

Permalink
Rename 'unknown1' column to 'detector_signal'
Browse files Browse the repository at this point in the history
Signed-off-by: Håkon Wiik Ånes <[email protected]>
  • Loading branch information
hakonanes committed Jan 30, 2023
1 parent 6664e71 commit 286a68a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
14 changes: 5 additions & 9 deletions orix/io/plugins/ang.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@

__all__ = ["file_reader", "file_writer"]

# MTEX has this format sorted out, check out their readers when fixing
# issues and adapting to other versions of this file format in the future:
# https://github.com/mtex-toolbox/mtex/blob/develop/interfaces/loadEBSD_ang.m
# https://github.com/mtex-toolbox/mtex/blob/develop/interfaces/loadEBSD_ACOM.m

# Plugin description
format_name = "ang"
file_extensions = ["ang"]
Expand Down Expand Up @@ -174,7 +169,8 @@ def _get_vendor_columns(header: List[str], n_cols_file: int) -> Tuple[str, List[
Returns
-------
vendor
Determined vendor (``"tsl"``, ``"astar"``, or ``"emsoft"``).
Determined vendor (``"tsl"``, ``"astar"``, ``"emsoft"`` or
``"orix"``).
column_names
List of column names.
"""
Expand Down Expand Up @@ -207,12 +203,12 @@ def _get_vendor_columns(header: List[str], n_cols_file: int) -> Tuple[str, List[
"iq", # Image quality from Hough transform
"ci", # Confidence index
"phase_id",
"unknown1",
"detector_signal",
"fit", # Pattern fit
"unknown1",
"unknown2",
"unknown3",
"unknown4",
"unknown5",
],
1: [
"euler1",
Expand All @@ -223,7 +219,7 @@ def _get_vendor_columns(header: List[str], n_cols_file: int) -> Tuple[str, List[
"iq",
"ci",
"phase_id",
"unknown1",
"detector_signal",
"fit",
],
},
Expand Down
8 changes: 4 additions & 4 deletions orix/tests/io/test_ang.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ def test_load_ang_tsl(
assert non_indexed_fraction == np.sum(~xmap.is_indexed)

# Properties
prop_names = ["iq", "ci", "unknown1", "fit"]
prop_names += [f"unknown{i + 2}" for i in range(n_unknown_cols - 1)]
prop_names = ["iq", "ci", "detector_signal", "fit"]
prop_names += [f"unknown{i + 1}" for i in range(n_unknown_cols - 1)]
assert list(xmap.prop.keys()) == prop_names

# Coordinates
Expand Down Expand Up @@ -399,12 +399,12 @@ def test_get_header(self, temp_ang_file):
"iq",
"ci",
"phase_id",
"unknown1",
"detector_signal",
"fit",
"unknown1",
"unknown2",
"unknown3",
"unknown4",
"unknown5",
],
ANGFILE_TSL_HEADER,
),
Expand Down

0 comments on commit 286a68a

Please sign in to comment.