orix icon indicating copy to clipboard operation
orix copied to clipboard

Add CTF file reader and interactive crystal map plot example

Open IMBalENce opened this issue 2 years ago • 15 comments

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

  • [x] The PR title is short, concise, and will make sense 1 year later.
  • [x] New functions are imported in corresponding __init__.py.
  • [x] 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.

IMBalENce avatar May 16 '23 08:05 IMBalENce

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.

IMBalENce avatar May 29 '23 01:05 IMBalENce

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

hakonanes avatar Nov 03 '23 16:11 hakonanes

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

IMBalENce avatar Nov 05 '23 22:11 IMBalENce

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

hakonanes avatar Nov 06 '23 08:11 hakonanes

@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.

IMBalENce avatar Dec 05 '23 05:12 IMBalENce

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!

hakonanes avatar Dec 18 '23 20:12 hakonanes

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 avatar Mar 26 '24 14:03 CSSFrancis

@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 avatar Mar 26 '24 15:03 CSSFrancis

pre-commit.ci autofix

CSSFrancis avatar Mar 27 '24 17:03 CSSFrancis

@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.

IMBalENce avatar Apr 17 '24 02:04 IMBalENce

I'm ready to help and review, btw.

hakonanes avatar Apr 17 '24 05:04 hakonanes

@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.

hakonanes avatar Apr 25 '24 20:04 hakonanes

@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.

IMBalENce avatar May 02 '24 02:05 IMBalENce

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.

hakonanes avatar May 11 '24 13:05 hakonanes

Thank you, @hakonanes. It looks great!

IMBalENce avatar May 13 '24 01:05 IMBalENce

Fantastic, thanks for having a look, @IMBalENce!

hakonanes avatar May 13 '24 19:05 hakonanes