Skip to content

Commit

Permalink
Add deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
viljarjf authored Sep 5, 2024
1 parent 18b405b commit 575f642
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pyxem/signals/indexation_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,15 @@ def rotation_from_orientation_map(result, rots):
return ori


@deprecated(
since="0.20",
removal="1.0.0",
alternative="pyxem.signals.indexation_results.vectors_from_orientation_map",
)
def extract_vectors_from_orientation_map(result, all_vectors, n_best_index=0):
return vectors_from_orientation_map(result, all_vectors, n_best_index=n_best_index)


def vectors_from_orientation_map(result, all_vectors, n_best_index=0):
index, _, rotation, mirror = result[n_best_index, :].T
index = index.astype(int)
Expand Down Expand Up @@ -604,6 +613,16 @@ def to_single_phase_orientations(self, **kwargs) -> Orientation:
symmetry=self.simulation.phases.point_group,
)

@deprecated(
since="0.20",
removal="1.0.0",
alternative="pyxem.signals.OrientationMap.to_vectors",
)
def to_single_phase_vectors(
self, n_best_index: int = 0, **kwargs
) -> hs.signals.Signal1D:
return self.to_vectors(n_best_index=n_best_index, **kwargs)

def to_vectors(self, n_best_index: int = 0, **kwargs) -> hs.signals.Signal1D:
"""Get the reciprocal lattice vectors for each navigation position.
Expand Down

0 comments on commit 575f642

Please sign in to comment.