Skip to content

Commit

Permalink
bragg vectors copy
Browse files Browse the repository at this point in the history
  • Loading branch information
smribet committed Jul 13, 2023
1 parent 67dc9dc commit 2ebfb32
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion py4DSTEM/braggvectors/braggvectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,13 @@ def get_vectors(

def copy(self, name=None):
name = name if name is not None else self.name+"_copy"
braggvector_copy = BraggVectors(self.Rshape, self.Qshape, name=name)
braggvector_copy = BraggVectors(
self.Rshape,
self.Qshape,
name=name,
calibration = self.calibration.copy()
)

braggvector_copy._v_uncal = self._v_uncal.copy()
for k in self.metadata.keys():
braggvector_copy.metadata = self.metadata[k].copy()
Expand Down

0 comments on commit 2ebfb32

Please sign in to comment.