DefDAP icon indicating copy to clipboard operation
DefDAP copied to clipboard

Fix labelling and position of HCP grains in IPF

Open rhysgt opened this issue 1 year ago • 3 comments

HCP orientations are now plotted onto the IPF in the correct place. There is an option to choose between triangle facing down (like aztec) and triangle facing up (like mtex).

rhysgt avatar Dec 05 '24 10:12 rhysgt

This breaks ifp colour plotting so not a good approach. maybe just changing the labels is fine.

rhysgt avatar Dec 05 '24 23:12 rhysgt

Have you checked the IPF colouring for cubic and hex crystals when you fixed? I fixed and checked IPF point plotting for both but didn't account for breaking colouring at all.

mikesmic avatar Feb 04 '25 10:02 mikesmic

I checked hex and did a quick patch cb858f4. I'll check cubic also and get back to you.

rhysgt avatar Feb 04 '25 10:02 rhysgt

@mikesmic I've added a test for Quat.calc_ipf_colours based on values that I know are correct. Do you have any suggestions on how to improve? I have also added a patch to fix the cubic\hex ipf colours, but could do with improving the logic. Currently, I pass triangle='ipf_map', which uses the same beta_range as before.

rhysgt avatar Aug 04 '25 15:08 rhysgt

Can't we just change the directions the colour components are calculated against and use the 'up' convention we already have? Test looks good. Could you add a few more cases, maybe with crystal directions other than <100> and then I'll try to make the colours work

mikesmic avatar Aug 04 '25 17:08 mikesmic

Sounds good. Added an additional ori and some directions. Something in file_readers is breaking tests on Python <=3.10 also.

rhysgt avatar Aug 05 '25 08:08 rhysgt

I know what the issue is with the file readers, I'll fix later.

mikesmic avatar Aug 05 '25 08:08 mikesmic

I've updated the RGB directions so the extra IPF triangle convention isn't needed. The only thing I didn't check is changing the hex orthonormalisation convention from hkl to tsl. Not sure what happened with that before.

mikesmic avatar Aug 12 '25 16:08 mikesmic

I was thinking of adding a test in the EBSD class also to check for the correct result for ipf x,y,z colours and positions, using the test ebsd data? Would also need one for hcp and perhaps non-OI data as well? Would that do the job?

rhysgt avatar Aug 14 '25 11:08 rhysgt