mtex icon indicating copy to clipboard operation
mtex copied to clipboard

error finding wignerTrafoAdjointmex

Open vedadb opened this issue 1 year ago • 13 comments

What do you want to do? Evaluate ODF

What code do you use? Please provide minimalist code with code in the following form

odf = calcDensity(ebsd.orientations); ori = orientation.byMiller([0 0 1],[0 0 1], ebsd.CS); odf.eval(ori)

Error Message Unrecognized function or variable 'wignerTrafomex'.

Error in SO3FunHarmonic/wignerTrafo (line 61) ghat = wignerTrafomex(N,SO3F.fhat,flags,sym);

What MTEX version do you use? 6.0.beta3

A workaround is to rename all wignerTrafo-functions such that trailing "mex" is removed.

vedadb avatar Nov 29 '24 12:11 vedadb

Same issue with mtex-6.0.0. I needed to compile the mex files for the function to be findable. I'm on apple silicon.

Dan

djm87 avatar Dec 06 '24 00:12 djm87

Hi Vedad,

thank you for pointing this out. I have no idea, where this bug originates from.

Ralf

ralfHielscher avatar Dec 09 '24 12:12 ralfHielscher

Hi Dan, can you send me the binaries for your mac? Ralf.

ralfHielscher avatar Dec 09 '24 13:12 ralfHielscher

Hello! any follow up on this? Like Dan, I have that version and environment.

Zinjifrah17 avatar Dec 15 '24 21:12 Zinjifrah17

Hi everyone, I encountered the same issue on my MacBook Air (M3). I installed Xcode and then ran the mex_install.m file located in mtex-6.0.0/mex/ within MATLAB, when the command line showed “* wignerTrafomex.c is compiling,” it started working after that.

maguag avatar Dec 19 '24 07:12 maguag

Hi maguag, great work! Could you please send me the compiled binaries such that I can include them into a bugfix release of MTEX? Thank you very much, Ralf.

ralfHielscher avatar Dec 19 '24 08:12 ralfHielscher

Hi Ralf, The binaries were uploaded. mex.zip

maguag avatar Dec 19 '24 09:12 maguag

Thank you! This helped! (mtex-6.0.0, MacBook Pro 2017 Intel i7)

LankyFlash avatar Dec 30 '24 21:12 LankyFlash

Ideally, the compiled binaries would be done with Apple code signing. Currently, every binary that ships with MTEX needs to be approved during installation. This leads to having to install MTEX several times to get the permissions correct and tests to complete.

Dan

djm87 avatar Jan 02 '25 15:01 djm87

Hi Dan, do you have any idea how this works? Ralf.

ralfHielscher avatar Jan 02 '25 15:01 ralfHielscher

update on this: I used this fix on windows 10 with R2023a as wel. Got an error for missing compilers, installed mingw from mathworks and ran mex_install.m again on matlab. Fixed it :)

LankyFlash avatar Jan 03 '25 17:01 LankyFlash

Hi Ralf et al.,

I had the same issue as djm87 and maguag, and solved it by using the magaug's binery zip file. The Mtex 6.0 works now on my Mac (M2), apart from plottingConvention. It keeps plotting the default and doesn't follow the changes when made.

I used the old control (I prefer it and it works on my PC)

ebsd.plottingConvention.east= vector3d.X; ebsd.plottingConvention.outOfScreen=vector3d.Z;

and not the how2plot = plottingConvention(zvector,xvector); - this one also didn't work if I would make changes.

Is it a bug, or am I doing something wrong.

Many thanks!

Zoja

3oja avatar Feb 13 '25 10:02 3oja

I have the same issue, has anyone reached a solution?

sarialzerey avatar Jun 23 '25 20:06 sarialzerey

My error was

Unrecognized function or variable 'wignerTrafoAdjointmex'.

Error in SO3FunHarmonic.adjoint (line 196) fhat = wignerTrafoAdjointmex(N,ghat,flags,sym);

Error in SO3FunRBF/calcFourier (line 37) SO3FH = SO3FunHarmonic.adjoint(ori,c,varargin{:},'bandwidth',L);

Error in SO3FunHarmonic (line 55) f_hat = calcFourier(fhat,varargin{:});

Error in FourierODF (line 17) odf = SO3FunHarmonic(C,varargin{:});

Error in orientation/calcFourierODF (line 55) odf = FourierODF(odf,'bandwidth',get_option(varargin,{'L','bandwidth','fourier'},L,'double'),varargin{:});

Error in rotation/calcDensity (line 78) odf = calcFourierODF(ori,varargin{:},'kernel',psi);

Error in WC_C_01 (line 211)

and i solved by going with file explorer in folder Mtex/mex, where i found a mex file called "wignerTrafoAdjoint". I changed its name to "wignerTrafoAdjointmex" and the code worked

JMTaba avatar Jul 21 '25 13:07 JMTaba

@JMTaba see this https://github.com/mtex-toolbox/mtex/issues/2389#issuecomment-3000796676

sarialzerey avatar Jul 21 '25 14:07 sarialzerey