py4dstem / py4DSTEM

GNU General Public License v3.0
199 stars 135 forks source link

Requesting example of generate_synthetic_probe method in a use case #653

Closed Marcraven closed 4 months ago

Marcraven commented 4 months ago

Is your feature request related to a problem? Please describe. I have a dataset with no void and I dont feel comfortable getting the kernel probe from the sample region

Describe the solution you'd like I would like to get a synthetic probe example to know how to work with it.

Describe alternatives you've considered So far I am still using the vacuum probe from a ROI, but it is not really vacuum.

Additional context Add any other context or screenshots about the feature request here.

smribet commented 4 months ago

Hi Marc,

Here is an example for generating a synthetic vacuum probe:

probe = py4DSTEM.Probe.generate_synthetic_probe(
    radius = probe_semiangle,
    width = 0.7,
    Qshape = datacube.Qshape
)

probe.get_kernel(
    mode = 'sigmoid',
    origin = (datacube.Qshape[0]/2,datacube.Qshape[0]/2),
    radii = (probe_semiangle * 1.2,
             probe_semiangle * 4
    )
)

py4DSTEM.visualize.show_kernel(
    probe.kernel,
    R = 30,
    L = 30,
    W = 1
)
Marcraven commented 4 months ago

Thanks!