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

DataSet.hkl_to_asu(anomalous=True) should map centric reflections to Friedel-plus ASU #25

Closed
JBGreisman opened this issue Dec 3, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@JBGreisman
Copy link
Member

When DataSet.hkl_to_asu() is called with the anomalous=True flag, reflections are mapped to the Friedel +/- ASU. This makes it useful to construct calls using DataSet.groupby(["H", "K", "L"]) that handle Friedel pairs separately. However, all reflections are only defined as Friedel +/- based on the M/ISYM flag (odd are Friedel+, even. are Friedel-), even if they are centric.

Example:

import reciprocalspaceship as rs

unmerged = rs.read_mtz("tests/data/algorithms/HEWL_unmerged.mtz")
unmerged.label_centrics(inplace=True)

example = unmerged.loc[[(11, 11, 8), (11, -11, -8), (-11, -11, -8)], ["BATCH", "CENTRIC"]]
print("Observations:")
print(example)

not_anom = example.hkl_to_asu(anomalous=False)
print("Friedel + ASU:")
print(not_anom)

anom = example.hkl_to_asu(anomalous=True)
print("Friedel +/- ASU:")
print(anom)

Outputs:

Observations:
            BATCH  CENTRIC
H   K   L                 
 11  11  8    454     True
    -11 -8    909     True
        -8    474     True
-11 -11 -8    203     True
        -8    814     True
        -8    627     True
Friedel + ASU:
         BATCH  CENTRIC  M/ISYM
H  K  L                        
11 11 8    454     True       1
      8    909     True       4
      8    474     True       4
      8    203     True       2
      8    814     True       2
      8    627     True       2
Friedel +/- ASU:
            BATCH  CENTRIC  M/ISYM
H   K   L                         
 11  11  8    454     True       1
-11 -11 -8    909     True       4
        -8    474     True       4
        -8    203     True       2
        -8    814     True       2
        -8    627     True       2

This behavior should be modified to only be used for acentric reflections -- centric reflections should not be considered "Friedel", and should only be mapped to the Friedel-plus ASU. The above example should give identical results for hkl_to_asu() with anomalous=True and anomalous=False.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant