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

Relax space group requirement when creating phase from CIF #522

Merged
merged 4 commits into from
Sep 20, 2024

Conversation

hakonanes
Copy link
Member

@hakonanes hakonanes commented Sep 19, 2024

Description of the change

This PR addresses #505 by using a try/except to potentially skip the space group if diffpy.structure could not read it.

@OverEthanol, can you test this branch and see if you can read your file?

This PR also replaces Union[X, Y] with X | Y in type hints in the crystal_map.phase_list module.

Progress of the PR

Minimal example of the bug fix or new feature

>>> from orix.crystal_map import Phase
>>> Phase.from_cif("ZIF-L_1509273.cif")
<name: ZIF-L_1509273. space group: Cmca. point group: mmm. proper point group: 222. color: tab:blue>

For reviewers

  • The PR title is short, concise, and will make sense 1 year later.
  • New functions are imported in corresponding __init__.py.
  • New features, API changes, and deprecations are mentioned in the unreleased
    section in CHANGELOG.rst.
  • Contributor(s) are listed correctly in __credits__ in orix/__init__.py and in
    .zenodo.json.

@hakonanes hakonanes added the bug Something isn't working label Sep 19, 2024
@hakonanes hakonanes added this to the v0.13.1 milestone Sep 19, 2024
@hakonanes hakonanes linked an issue Sep 19, 2024 that may be closed by this pull request
@hakonanes hakonanes mentioned this pull request Sep 19, 2024
7 tasks
Copy link
Member

@pc494 pc494 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, merging.

@pc494 pc494 merged commit ae9dcd5 into pyxem:develop Sep 20, 2024
12 checks passed
@hakonanes hakonanes deleted the 505-improve-cif-reader branch September 20, 2024 10:01
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

Successfully merging this pull request may close these issues.

Phase.from_cif() fails because space_group cannot be read
2 participants