py4dstem / py4DSTEM

GNU General Public License v3.0
197 stars 134 forks source link

Crystalline Phase Mapping #655

Open Marcraven opened 2 months ago

Marcraven commented 2 months ago

Thanks for this amazing piece of software!

Is your feature request related to a problem? Please describe. The original py4DSTEM paper shows a very nice crystal phase map, but the execution is not well described there.

Describe the solution you'd like I would like the code necessary to generate such phase map given a sample which has single crystalline and powder regions combined.

Describe alternatives you've considered I am right now considering to use the classification method for the twinned crystal using voronoi tesellation, but I am not sure how to chose Qx and Qy for the voronoi in this case (with powder rings included).

I have developed a circular voronoi tesellation, but then I realize that in order to initialize th BraggVectorClassification class, the data has to be given as PointListArray instead of PointList. The only PointListArray I can extract from my braggpeaks PointList is braggpeaks._v_uncal, but of course this is uncalibrated...

Additional context I attach my calibrated BraggVectorMap to show the combination of powder and crystal regions.

image

maclariz commented 4 weeks ago

Discussion happens better on Slack

If all you are trying to do is separate crystalline and amorphous, if you set all your peak detection so it detects peaks for crystalline but ignores the amorphous diffuse rings, then your points list will contain all the information you need. You could then add up all diffracted intensity (excluding primary beam) for each pixel and make a crystal image. I could help further as that is the sort of thing we are doing in https://arxiv.org/abs/2405.02037 (currently under review at Journal and code should be in py4dstem soon).