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

Hkl channel5 reader #465

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Conversation

ondrolexa
Copy link

Description of the change

Plugin to read crystal map from HKL Channel5 ctf file

Progress of the PR

Minimal example of the bug fix or new feature

>>> from orix.io import load
>>> xmap = load('hklch5.ctf')
>>> 

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.

@ondrolexa
Copy link
Author

I realized that ctf reader implementation is already in PR #451. Sorry for duplication...

@hakonanes
Copy link
Member

Hi Ondrej! Thank you for making this PR. It might be that your work here can improve the already opened PR by @IMBalENce. I'll have a look. Let's keep it open for now.

@hakonanes hakonanes added the enhancement New feature or request label Dec 5, 2023
@hakonanes
Copy link
Member

Hi @ondrolexa, we've finally merged the CTF reader in #451 into the develop branch. Can you try this out on your datasets?

@ondrolexa
Copy link
Author

Hi @ondrolexa, we've finally merged the CTF reader in #451 into the develop branch. Can you try this out on your datasets?

It seems to read my ctf files without problem...

>>> xmap = io.load("orix-tests/EBSD-Ondro/SM3-3.ctf")
/home/ondro/develrepo/orix/orix/crystal_map/phase_list.py:250: UserWarning: Setting space group to 'None', as current space group 'P3121' is derived from current point group '32'.
  warnings.warn(
>>> xmap
Phase     Orientations         Name  Space group  Point group  Proper point group       Color
   -1     33747 (6.6%)  not_indexed         None         None                None           w
    1   456027 (88.6%)   Quartz-new         None          -3m                  32    tab:blue
    2     24794 (4.8%)    Muscovite         None          2/m                 112  tab:orange
Properties: bands, error, MAD, BC, BS
Scan unit: um

@hakonanes
Copy link
Member

It seems to read my ctf files without problem...

Great! But, we should avoid that warning. There seems to be some inconsistency in how we set the symmetry from your file. Do you mind sharing the file? Or even better, if you find the reason why, could you a PR to silence the warning?

Also, I see you have listed the CTF error codes in this PR. They would be very nice to have in the CTF reader we just merged. Could you open a new PR and add them to the Notes section in the file_reader() function in the CTF reader, with a brief description and a source (manual or similar)?

Notes
-----
Files written by MTEX do not contain information of the space group.
Files written by EMsoft have the column names for mean angular
deviation (MAD), band contrast (BC), and band slope (BS) renamed to
DP (dot product), OSM (orientation similarity metric), and IQ (image
quality), respectively.

@ondrolexa
Copy link
Author

Here is a zipped ctf file producing the warning SM3-3.zip. Later I can make a PR to update Notes section of file_reader() function.

@ondrolexa
Copy link
Author

Anyway if I remember well, the error codes was adopted from ctfFile3.py file of the xcdskd project...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants