You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In _get_phases_from_header() under orix/io/plugins/ang.py, there is a section of code (permalink) that replaces the phase names loaded from the .ang file header with phase formulas (also loaded from said file header) if a formula exists for each phase. This does tend to reduce the verbosity of the automatically loaded phase names. However, it is possible for multiple distinct phases to have the same formula - in my case, alpha titanium and beta titanium both had a formula of "Ti". The automatic replacement causes multiple phases to have the same name when loading such a file using orix.io.load(), which breaks the ability to select data from individual phases in a CrystalMap by phase name.
Thankfully, the phases in the loaded CrystalMap are still distinct outside of the identical names, so the phase names can be manually overridden after loading, at which point everything works properly again. However, this seems like a sufficiently common situation that it should be addressed more directly, especially since the default phases in APEX (the most recent EDAX software for EBSD data acquisition) are "Generic FCC" and "Generic BCC", both with a formula of "Fe", on top of the issue with dual-phase Ti scans.
A few possible options:
Remove the name-replacement code entirely
Add a check so that the replacement is only done if each phase has a unique formula
Detect duplicates phase names and raise a warning so the user knows they need to manually override the duplicates
(they will probably find out once their code breaks, but the warning will make the cause a little more obvious)
The text was updated successfully, but these errors were encountered:
In
_get_phases_from_header()
underorix/io/plugins/ang.py
, there is a section of code (permalink) that replaces the phase names loaded from the .ang file header with phase formulas (also loaded from said file header) if a formula exists for each phase. This does tend to reduce the verbosity of the automatically loaded phase names. However, it is possible for multiple distinct phases to have the same formula - in my case, alpha titanium and beta titanium both had a formula of "Ti". The automatic replacement causes multiple phases to have the same name when loading such a file usingorix.io.load()
, which breaks the ability to select data from individual phases in aCrystalMap
by phase name.Thankfully, the phases in the loaded
CrystalMap
are still distinct outside of the identical names, so the phase names can be manually overridden after loading, at which point everything works properly again. However, this seems like a sufficiently common situation that it should be addressed more directly, especially since the default phases in APEX (the most recent EDAX software for EBSD data acquisition) are "Generic FCC" and "Generic BCC", both with a formula of "Fe", on top of the issue with dual-phase Ti scans.A few possible options:
(they will probably find out once their code breaks, but the warning will make the cause a little more obvious)
The text was updated successfully, but these errors were encountered: