Thanks for the reply. Apologies, but this workaround doesn't appear to quite work correctly either, with spectra at 'sampleOri' of [0 0 0] and [0 pi/2 0] appearing identical (I'm using easyspin-6.0.0-dev.29). Also the case for [pi/2 0 0 and [0 0 pi/2]. Interestingly [0 pi/4 0] and [pi/2 pi/2 0] appears to give what I would expect from the [0 pi/2 0] or [pi/2 0 0] orientations (gx==gy=/=gz and Ax==Ay=/=Az). A sampleOri of [0 pi/2 pi/2] also gives some orientation dependence, although no z-axis orientation dependence should be observed based on the parameters given. It's as if the frame isn't oriented correctly, but I'm unsure what is causing this. Specifying Exp.MolFrame and/or Exp.CrystalOrientation of [0 0 0] has no effect.
I can add a lambda term to the 'orifun' function below (like how lambda appears in the Exp.Ordering documentation) and adjust the sign of lambda to mimic the orientation dependence observed at 0 and 90 degrees, keeping sampleOri = [0 0 0], but doing so isn't particularly helpful to reproduce the spectra at different angles or a full orientation pattern (in 10 degree steps). I would hope it would be possible to call Exp.Ordering within a for loop of different sampleOri (from your code below) to achieve this, plotting using a stackplot.
Is it necessary to specify values for phi and theta? I'm unsure on its definition, especially since I want to control sample orientation by varying sampleOri, but doing so results in no orientation dependence with any values of sampleOri, or any change in the produced spectra. Omitting phi and theta values results in multiple columns of vector values for v to be generated, which also doesn't seem right.
Could I ask what the separate terms in the Exp.Ordering function control, i.e. Exp.Ordering = @(phi,theta)orifun(phi,theta,sampleOri), and why phi and theta are referred to twice? I'm by no means an easyspin or matlab expert.
Code: Select all
lambda = 2.5;
U = -lambda*(3*cos(theta).^2-1)/2;
P = exp(-U);