Comments (5)
Hey Jack, I am wondering what is the current situation of the issue (Maybe this is not an issue anymore)?
If I have one-column anomalous data (similar to that after calling stack_anomalous
), is there anything wrong if I call to_reciprocal_grid
?
from reciprocalspaceship.
If I understand correctly, say I have a stacked one-column anomalous data, the only difference would be I have to skip the line p1 = p1.expand_anomalous()
in to_reciprocal_grid
function?
from reciprocalspaceship.
Yes -- this is currently unsupported because of the line you mentioned. If one-column anomalous data is provided, it should be sufficient to just skip the call the p1.expand_anomalous()
, but I haven't actually tested that.
For 2-column anomalous data, a few more changes will be needed because a call to stack_anomalous()
will be needed. We would also need to make some API decisions about how the two columns are specified (e.g. tuple of column labels
)
from reciprocalspaceship.
Yes, that makes sense.
How about taking another argument like anomalous=False
? And when set to True, whether to callstack_anomalous
or skip that line can be determined by the number of columns in the key
?
I am happy to create a PR for this if you think above is a good way.
from reciprocalspaceship.
I think we can make the interface work intuitively without the need for anomalous=[True|False]
. I think the following should work, but let me know if you think I'm missing something:
- If key is a single string, we check whether all HKLs are in the
+ ASU
. If they are, we callp1.expand_anomalous()
. If the HKLs are in+/- ASU
we skip the call top1.expand_anomalous()
. This should support non-anomalous data, or single-column anomalous. - If the key is a pair of strings, we assume that we are operating in two-column anomalous mode. We call
stack_anomalous()
, and then treat it as one-column anomalous data as above.
Implicitly, there are two checks that will automatically happen:
stack_anomalous()
will confirm that the two columns have the samedtype
for us when operating in two-column mode.expand_to_p1()
will ensure that we are operating on amerged
DataSet. This function only makes sense for merged data with unique Miller indices, because otherwise the order of the data will matter (the last entry for each Miller index will overwrite the preceding entries in the reciprocal grid).
from reciprocalspaceship.
Related Issues (20)
- Add `sample_rate` or `resolution_cutoff` options for `to_reciprocalgrid` HOT 5
- rs.DataSet.assign_resolution_bins ought to return bin edges HOT 1
- 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 6
- 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
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.