Skip to content

Commit

Permalink
adding plotting of BVects
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rakowski committed Dec 11, 2023
1 parent cf256ec commit b5cdd80
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions py4DSTEM/braggvectors/braggvectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from py4DSTEM.data import Data
from emdfile import Custom, PointListArray, PointList, Metadata
from py4DSTEM.braggvectors.braggvector_methods import BraggVectorMethods
from py4DSTEM.process.diffraction import plot_diffraction_pattern
from os.path import basename
import numpy as np
from warnings import warn
Expand Down Expand Up @@ -389,6 +390,31 @@ def __repr__(self):
string += " Access data with .qx, .qy, .I, or .data. Optionally .h, .k, and.l, if indexed)"
return string

def plot(
self,
returnfig: bool = False,
**kwargs,
):
"""
Plot the diffraction pattern.
Calls `py4DSTEM.process.diffraction.plot_diffraction_pattern` and passes kwargs to it.
Parameters
----------
returnfig: bool
If True the figure is returned, else its ploted but not returned. Defaults to False
Returns
-------
figure : matplotlib object
If `returnfig` is True, the figure is returned.
"""
if returnfig:
return plot_diffraction_pattern(self, **kwargs)
else:
plot_diffraction_pattern(self, **kwargs)


class RawVectorGetter:
def __init__(
Expand Down

0 comments on commit b5cdd80

Please sign in to comment.