Closed erh3cq closed 4 months ago
I saw extremely similar grid artifacts using a Dectris when either the pixel or step size was incorrect. The mitigation by updating probes and probe position kind of also hints at that... Idk could just be a me problem, but I am haunted by grid patterns that look like that 😂
Thanks for the report @erh3cq! I've been sitting on a tutorial notebook which investigates gridding-artifacts for the past couple of weeks, and haven't found time to finalize/post it. Attaching it here in the meantime, you can find the necessary data files here.
Unfortunately, gridding is a pathological artifact in "blind" ptychography (i.e. where one tries to solve for the probe and the object simultaneously). This is well-known in the X-Ray ptychography literature, and in-fact why they have switched away from raster-scans and instead opt for spiral scans.
That being said, the notebook investigates regimes where this is more/less pronounced - and possible remedies. I summarize them here briefly with this figure, but do have a look at the notebook:
Finally, you mention implementing a filter for this. Indeed - the gridding artifacts are predictable, and we can easily add a Fourier filter which zeros-out those pixels. You get what you ask for with Fourier-filtering, so indeed this can reduce/remove gridding but our tests have shown the reconstructions to be fairly sub-optimal in other ways.
To clarify, and connect with @tcpekin comment above:
I saw extremely similar grid artifacts using a Dectris when either the pixel or step size was incorrect
Gridding is a pathological artifact due to the translation periodicity ambiguity introduced by raster scan patterns, and can be exacerbated by ANY kind of model-mismatch. The notebook above investigates the probe aperture and cropping box mismatch, but indeed calibration mismatch (including pixel-sizes and rotation) also result in gridding..
Closing this issue, now that the tutorials have been updated to include gridding-artifacts.
Problem: Ptychography reconstruction on Dectris (and other hybrid detectors with segments) is creating a 'gridding pattern' upon reconstruction. The grid can be seen in real and reciprocal space, but is most obvious in reciprocal space.
![qbin2ptycho_-_reconstruction_fft_720](https://github.com/py4dstem/py4DSTEM/assets/25358789/2a9d9045-e19d-426c-b3ad-a0d5bc9a5611)
Trouble shooting:
Expected behavior: artifact free reconstruction
Things to try @cophus suggested a series of filter that @smribet or @gvarnavi could implement
py4DSTEM version 0.14.9 (from github phase) Python version 3.12.1 Operating system Windows