pyxem / orix

Analysing crystal orientations and symmetry in Python
https://orix.readthedocs.io
GNU General Public License v3.0
80 stars 48 forks source link

Add CTF file reader and interactive crystal map plot example #451

Closed IMBalENce closed 4 months ago

IMBalENce commented 1 year ago

Description of the change

Following up #412, added a file reader for Oxford AZtec HKL .ctf file. Added an example jupyter notebook for interactive plotting - clicking on an IPF map to retrieve phase name and Euler angles.

Progress of the PR

Minimal example of the bug fix or new feature

>>> from orix import io
>>> xmap = io.load("data.ctf") 
>>> xmap
Phase     Orientations         Name  Space group  Point group  Proper point group     Color
   -1      8358 (2.5%)  not_indexed         None         None                None         w
    1   322978 (97.5%)     Iron fcc        Fm-3m         m-3m                 432  tab:blue
Properties: bands, error, MAD, BC, BS
Scan unit: um

For reviewers

IMBalENce commented 1 year ago

Thank you so much for your time on reviewing my changes @hakonanes. A lot of very helpful suggestions!

I just realize some of the test did not pass. I'll work on the test code.

hakonanes commented 11 months ago

@IMBalENce, do you think we could finish this work? If you don't have time, no worries, I can look at finishing myself.

IMBalENce commented 11 months ago

@hakonanes Sorry for taking so long. It was a bit hectic lately. I'll do my best to work this out in two weeks.

hakonanes commented 11 months ago

No problem! I've been off development myself lately.

IMBalENce commented 10 months ago

@hakonanes I tried my best to address each of your comments. I think most should be ok now.

I also found some issue in running pytest and can get stuck in test_io.test_load_unsupported_format. To pass all test, I temporarily comment out this section. I was wondering what would be the best practice here?

Additionally, I'm still working on the test coverage on this ctf reader. I'm hoping to complete it in a day or two.

hakonanes commented 9 months ago

I also found some issue in running pytest and can get stuck in test_io.test_load_unsupported_format.

By stuck, do you mean that pytest hangs? Or that you get an error? It would be great if you could open an issue. We'd be much closer to a solution, then!

CSSFrancis commented 6 months ago

Any movement on this lately? I can take a shot at debugging the failing test if that is helpful. Is that that only thing that is blocking this from merging?

CSSFrancis commented 6 months ago

@IMBalENce The failing test is related to the fact that there used to be a warning for trying to read a .ctf file.
(And now you can!)

CSSFrancis commented 6 months ago

pre-commit.ci autofix

IMBalENce commented 5 months ago

@CSSFrancis Sorry for the delay in moving this forward again. Thank you for the tips. I'm testing it now. Will get it back soon.

hakonanes commented 5 months ago

I'm ready to help and review, btw.

hakonanes commented 5 months ago

@IMBalENce, I'm looking over the PR now. I have a few suggestions for changes. I'll make a PR to your branch if that's OK.

IMBalENce commented 5 months ago

@IMBalENce, I'm looking over the PR now. I have a few suggestions for changes. I'll make a PR to your branch if that's OK.

Thank you @hakonanes. Have just merged your changes.

hakonanes commented 4 months ago

This should now be done. Could you have a brief look at my latest changes, @IMBalENce? These are the changes since you merged my PR to your branch: https://github.com/pyxem/orix/compare/2b3b7f0337f5a9d6b4171c99074352666c28ccd4...a68d37e3e3c50063ba3fb918e560db6f11b20c17.

IMBalENce commented 4 months ago

Thank you, @hakonanes. It looks great!

hakonanes commented 4 months ago

Fantastic, thanks for having a look, @IMBalENce!