Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about strain and orientation mapping #682

Open
sbachu6812 opened this issue Sep 6, 2024 · 1 comment
Open

Questions about strain and orientation mapping #682

sbachu6812 opened this issue Sep 6, 2024 · 1 comment

Comments

@sbachu6812
Copy link

Thanks very much for creating the very useful py4DSTEM package. I have a few questions about strain mapping and ACOM routines:

  1. I acquire my 4DSTEM data for strain mapping using C2 20 aperture (0.6 mrad semi convergence angle and 2.3 nm probe size FWHM). So, I see diffraction spots instead of disks. When I set template = None in the disk detection step during the data processing, the code is not detecting any spots at all. Should I change any of the filtering arguments such as minAbsoluteIntensity or minRelativeIntensity or subpixel when using template = None?

  2. I use the same CL and C2 aperture for all my experiments. So, I created one probe template by collecting a quick dataset from vacuum and use the same to detect spots for all my datasets. As of now, I saved the probe template as a tif image and load it back as kernel and pass it to template. Is it ok to do that? Or, is there a better way to save the probe template and reuse it?

  3. For ACOM routine, if my dataset has 2 polycrystalline materials, say W and Cu, in the field of view, how do I go about it? Do I run the ACOM routine for the entire dataset twice, one for each material? Also, that will give me separate orientation maps of Cu and W. Is there a way to combine them into one composite map?

  4. For ACOM routine of one material, after I get the orientation map, is there a way to measure the grain sizes? Are you planning to add that routine in the future? I am just curious.

py4DSTEM version: 14.9
Python version: 3.11.4

@bsavitzky
Copy link
Member

Hi @sbachu6812 , thanks for the question and sorry for the slow response.

  1. Yup, that's exactly right. You should modify those filtering arguments for most disk detection, including when template=None. This function doesn't select defaults in any clever way so this is an important step.

  2. That's a completely reasonable way to do things. You can alternatively load your probe template from your .tif once, then store that in a py4DSTEM Probe instance which you can save to an h5 file, e.g.

probe = py4DSTEM.Probe(your_array_from_tif)
probe.get_kernel( ... ) # an advantage to doing it this way is you'll only have to do this once
py4DSTEM.save("path_to_probe_file.h5", probe)

and then any time you want to use this probe again with

probe = py4DSTEM.read("path_to_probe_file.h5")

It is ultimately the same, so whichever way works for you is best. This way would cut down on a little boilerplate code. You also can save that probe object then in any .h5 file you're working with with whatever other processing data you're producing. One thing I will note, though, it to be a bit careful, as if microscope alignments change, your probe may look different between days even with the same CL and C2. If the alignments stay generally the same you may be fine, and in your case since you're doing nanobeam it's less likely to be a problem, so probably nothing to worry about, but worth noting.

  1. Yup, the best thing for now is to run ACOM for each material. Combining these is under development in a branch of @cophus's, so cc'ing him in here!

  2. Good question. Unfortunately this is somewhat dependent on the specific system how you would want to go about doing this, so it's not simple to implement a single algorithm that will catch all cases. Using the ACOM output matrices, you could start with some scikit image routines... can you share more about what your sample/micrographs look like?

Cheers,
Ben

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants