Skip to content

MTZ sanity checker? #56

@DHekstra

Description

@DHekstra

Abandoning #49 . The main issue there was that upstream user errors can cause duplicate Miller indices or Miller indices outside of the primary ASU coming into difference map calculations. It would be appropriate to detect these issues before going into diffmap.py and internaldiffmap.py.

Perhaps we could have a MTZ sanity check script containing these basic checks and, perhaps, others

        for _,(_ds, _ds_name) in enumerate(zip(datasets, dataset_names)):
            print(f"\nChecking {_ds_name}.")
            dup_sum  = np.sum(_ds.index.duplicated())
            if dup_sum  > 0:
                print(f"{_ds_name} contains {dup_sum } duplicate entries.")
            if not np.all(rs.utils.asu.in_asu(np.array(_ds.index.to_list()), _ds.spacegroup)):
                print(f"Some Miller indices of {_ds_name} are outside of the primary ASU.")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions