Skip to content

Commit

Permalink
Initial test of apex and oxford successful after refactoring includin…
Browse files Browse the repository at this point in the history
…g with new definitions, next steps i) add eds, ii) testing and removing mismatch to appdef
  • Loading branch information
atomprobe-tc committed Aug 30, 2024
1 parent cbab83e commit 8a98ea7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
//"../apex/InGaN_nanowires_linescan.edaxh5",
//"../apex/InGaN_nanowires_map.edaxh5",
//"../apex/InGaN_nanowires_spectra.edaxh5",
"tests/data/2023-08-16_Ni_NFDI.edaxh5",
//"tests/data/173_0057.h5oina",
//"tests/data/2023-08-16_Ni_NFDI.edaxh5",
"tests/data/173_0057.h5oina",
"--reader",
"em",
"--nxdl",
Expand All @@ -57,8 +57,8 @@
//"--output=pynxtools_em/dbg/zeiss.nxs",
//"--output=pynxtools_em/dbg/tfs.nxs",
//"--output=dbg/apex.nxs"
//"--output=dbg/hfive_oxford.nxs",
"--output=dbg/hfive_apex.nxs"],
"--output=dbg/hfive_oxford.nxs",
//"--output=dbg/hfive_apex.nxs"],
}
]
}
6 changes: 4 additions & 2 deletions src/pynxtools_em/methods/ebsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,12 @@ def regrid_onto_equisized_scan_points(
# TODO:: if scan_point_{dim} are calibrated this approach
# here would shift the origin to 0, 0 implicitly which may not be desired
if src_grid.dimensionality == 1:
tree = KDTree(np.column_stack((src_grid.pos["x"])))
tree = KDTree(np.column_stack((src_grid.pos["x"].magnitude)))
d, idx = tree.query(trg_pos, k=1)
elif src_grid.dimensionality == 2:
tree = KDTree(np.column_stack((src_grid.pos["x"], src_grid.pos["y"])))
tree = KDTree(
np.column_stack((src_grid.pos["x"].magnitude, src_grid.pos["y"].magnitude))
)
d, idx = tree.query(trg_pos, k=1)
if np.sum(idx == tree.n) > 0:
raise ValueError(f"kdtree query left some query points without a neighbor!")
Expand Down
12 changes: 6 additions & 6 deletions src/pynxtools_em/parsers/hfive_oxford.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,12 @@ def parse_and_normalize_slice_ebsd_phases(self, fp):
self.ebsd = EbsdPointCloud()
return
latt = Lattice(
abc[0].magnitude,
abc[1].magnitude,
abc[2].magnitude,
angles[0].magnitude,
angles[1].magnitude,
angles[2].magnitude,
abc[0],
abc[1],
abc[2],
angles[0],
angles[1],
angles[2],
) # TODO:: lattice passed to kikuchipy I think needs to be in degree!

# Space Group, no, H5T_NATIVE_INT32, (1, 1), Space group index.
Expand Down
2 changes: 1 addition & 1 deletion src/pynxtools_em/utils/nx_default_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def priority_select(self, template: dict, entry_id: int = 1) -> dict:
break

# find ebsd ipf map
idx_head = key.find("/ROI[roi1]")
idx_head = key.find("/roiID[roi1]")
idx_tail = key.find("/ebsd/indexing")
if idx_head is None or idx_tail is None:
continue
Expand Down

0 comments on commit 8a98ea7

Please sign in to comment.