-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add sample_rate
or resolution_cutoff
options for to_reciprocalgrid
#175
Comments
As it happens, I had just written this little helper function as a workaround: def spacing_to_gridsize(spacing, cell):
"""
Compute the optimal gridsize based on unit cell size and desired spacing
spacing : float
Desired (approximate) grid spacing in Angstroms
cell : gemmi.UnitCell
Or anything similar with attributes a, b, and c
NOTE: does not support different spacing in each direction, but in theory could
"""
gridsize = []
for dim in [cell.a, cell.b, cell.c]:
gridsize.append(int(dim // spacing))
return gridsize |
I think the most reliable implementations would use resolution cutoff:
sampling rate:
|
Just a note. ds.to_reciprocalgrid("F", sample_rate=3., dmin=5.) produces a 3x oversampled grid from the reflections out to 5A. Does that make sense? Am I talking crazy? |
I think that's reasonable. That latter case can still be implemented easily in gemmi for first thresholding at the given Just to summarize the proposed API change, there will be two mutually exclusive sets of options:
|
i think we can default |
Right now you need to specify the number of grid points along h, k, and l when creating a reciprocal space grid of a column in a data set. This is good for flexibility, but it is not very convenient. It would be nice to have the alternative to specify a
sample_rate
as ingemmi
or aresolution_cutoff
.The text was updated successfully, but these errors were encountered: