Skip to content

bug in interfaces\tools\calcUnitCell #2531

@PhilKro

Description

@PhilKro

calculate a new unit cell.

cant provide an example sadly, however, logically, the function regularPoly in calcUnitCell returns a 4x2 double whereas the property unitCell of an EBSD object is defined as a vector3d

What data do you have?
very complex one

What code do you use?
sorry cannot provide

Error Message
assignment of the new unitCell property works, but everything goes out the window if you try to plot ebsd data with a newly defined unitCell via
ebsd.unitCell = calcUnitCell([xnew,ynew]);
plot(ebsd, ebsd.orientations)

Fix*
Its a quick fix by calculating a vector 3d from the returend xy like:

unitCellXY = calcUnitCell([newX,newY])
newEBSD.unitCell = vector3d(unitCellXY(:,1),unitCellXY(:,2), zeros(size(unitCellXY(:,2))));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions