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

Default scanning region #230

Open
mondracek opened this issue Nov 10, 2023 · 1 comment
Open

Default scanning region #230

mondracek opened this issue Nov 10, 2023 · 1 comment

Comments

@mondracek
Copy link
Collaborator

I see the defaults for scanMin and scanMax are hard-wired as [0.0, 0.0, 5.0] and [20.0, 20.0, 8.0], respectively. I think it would be better to adjust the default depending on the atomic structure. This would be kind of a natural continuation of (now closed) issue #52.

@NikoOinonen
Copy link
Collaborator

I'll mention here that the GUI already does this under the hood when loading a new geometry:

def scanWindowFromGeom(self):
"""Infer and set scan window from current geometry"""
if self.xyzs is None:
return
scan_size = self.xyzs[:, :2].max(axis=0) - self.xyzs[:, :2].min(axis=0) + 2 * self.sw_pad
scan_size = np.minimum(scan_size, [25, 25]) # Let's not make it automatically too large, so that we don't run out of memory
scan_start = (self.xyzs[:, :2].max(axis=0) + self.xyzs[:, :2].min(axis=0)) / 2 - scan_size / 2

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

No branches or pull requests

2 participants