Skip to content

Commit

Permalink
adding to_strainmap method
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rakowski committed Nov 3, 2023
1 parent 3e5fcf9 commit e23878c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions py4DSTEM/braggvectors/braggvector_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,21 @@ def mask_in_R(self, mask, update_inplace=False, returncalc=True):
else:
return

def to_strainmap(self, name: str = None):
"""
Generate a StrainMap object from the BraggVectors
equivalent to py4DSTEM.StrainMap(braggvectors=braggvectors)
Args:
name (str, optional): The name of the strainmap. Defaults to None which reverts to default name 'strainmap'.
Returns:
py4DSTEM.StrainMap: A py4DSTEM StrainMap object generated from the BraggVectors
"""
from py4DSTEM.process.strain import StrainMap

return StrainMap(self, name) if name else StrainMap(self)


######### END BraggVectorMethods CLASS ########

Expand Down

0 comments on commit e23878c

Please sign in to comment.