Comments (5)
I think that's reasonable. That latter case can still be implemented easily in gemmi for first thresholding at the given dmin
prior to the to_gemmi()
call.
Just to summarize the proposed API change, there will be two mutually exclusive sets of options:
DataSet.to_reciprocalgrid(grid_size=(int, int, int))
DataSet.to_reciprocalgrid(sample_rate=float)
orDataSet.to_reciprocalgrid(dmin=float)
orDataSet.to_reciprocalgrid(sample_rate=float, dmin=float)
from reciprocalspaceship.
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
from reciprocalspaceship.
I think the most reliable implementations would use gemmi
for this:
resolution cutoff:
In [1]: ds.cell.get_hkl_limits(0.95) # Grid size should be this *2 to handle negative values
Out[1]: [28, 33, 36]
sampling rate:
In [2]: ds.to_gemmi().get_size_for_hkl(sample_rate=3)
Out[2]: [80, 96, 108]
from reciprocalspaceship.
Just a note. sample_rate
and resolution_cutoff
/ dmin
both influence grid size but are not mutually exclusive concepts. I think we should support both simultaneously so that
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?
from reciprocalspaceship.
i think we can default sample_rate
to 3.
and dmin
to the resolution of the mtz.
from reciprocalspaceship.
Related Issues (20)
- Cannot unstack_anomalous with other columns in index
- groupby apply drops cell and spacegroup HOT 2
- `stack_anomalous` inside `groupby` breaks `as_index=False` HOT 1
- Unstack anomalous taking into account Careless repeats HOT 10
- rs.utils.asu.in_asu() does not use the 'anomalous ASU' for stacked anomalous data. HOT 1
- function for cif file IO and possible support for multi-dataset files HOT 3
- `hkl_to_asu` does not annotate M/ISYM field correctly HOT 2
- support for read_precognition() for hkl without anomalous columns HOT 6
- unstack_anomalous makes data that phenix cannot interpret HOT 3
- API reference website display
- Return keys of dictionary in crystfel.py HOT 8
- add_rfree() does not consider Friedel mates HOT 2
- `rs.DataSet.reset_index()` call signature does not match pandas >1.5 HOT 1
- Used pandas.core.ops attribute does not appear to exist HOT 4
- A `rs.cifdump` utility? HOT 1
- No documentation of CrystFEL columns HOT 1
- mean_intensity_by_miller_index should use a grid HOT 1
- write_mtz SettingWithCopyWarning HOT 2
- Failure to correctly read Miller indices from cctbx-generated MTZ HOT 8
- RS requires set_index(["H","K","L"]) to create a multi_index using rs.DataSet HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reciprocalspaceship.