Opened 4 years ago

Closed 4 years ago

#1057 closed defect (fixed)

phi rotation issue for elliptical cylinder

Reported by: richardh Owned by: pkienzle
Priority: blocker Milestone: SasView 4.2.0
Component: sasmodels Keywords:
Cc: Work Package: SasView Bug Fixing

Description

for 2d data fitting for a couple of elliptical cylinder models that I have tested so far, the phi rotation seems to be giving the same effect as a psi rotation and not what I might expect.

I will have a look at the code, meanwhile will also assign this to Paul k.

Richard

Attachments (1)

phi_psi_issue_1.png (59.7 KB) - added by richardh 4 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 4 years ago by richardh

I think the code in modelinfo.py is likely OK. Same issue with parallelepiped, thus suspect perhaps a bug in the gui is sending psi rather than phi from the box on the screen? I've not found the code for that yet.

Changed 4 years ago by richardh

comment:2 Changed 4 years ago by richardh

./sascomp -double! -2d elliptical_cylinder theta=0 phi=20,0 psi=0,20 length=500 radius_minor=10 axis_ratio=3

the phi rotation looks like the psi one, though it ought to keep left-right symmetry

so its not a bug in the gui, and alas we don't have any unit tests for 2d scattering from anisotropic particles, so this would not have been picked up by tests

comment:3 Changed 4 years ago by richardh

I think that there is an issue here for all the anisotropic particles, not just elliptical_cylinder

comment:4 Changed 4 years ago by richardh

I was likely not in the correct branch, as I mistakenly thought that all the new orientation stuff was now in master, will try to investigate further on Thursday, though it would help if the build on my windows pc would actually work.

comment:5 Changed 4 years ago by butler

for the tests you are wanting to do wouldn't it be easiest to download the installer for this branch? I have run the "ready for testing on win64" on that PR (57) so you should be able to grab it from build.sasview.org. OOOPS … no you cant do that because it is a sasmodel change. Sorry you will have to build it on your machine :-(

Last edited 4 years ago by butler (previous) (diff)

comment:6 Changed 4 years ago by richardh

the new conda build thing seems to work on my laptop, I checked out ticket-1043 in sasmodels, and my bash window says it is using tinycc to compile the models.

Loading a 2d test data set, and with say elliptical cylinder model, the phi rotation is still not doing what I expect as detailed above, thuslooks the same as the Psi rotation.

Please could someone else check on their own machine.

comment:7 Changed 4 years ago by richardh

Finally, after spending most of the afternoon on this, I got a 64 bit windows build to work on my PC, which confirms previous observations on my laptop.

In either master or ticket-1043 branch, loading a 2d test data set, and with say elliptical cylinder model, the phi rotation is not doing what I expect as detailed above, it looks the same as the Psi rotation.

Please could someone else check on their own machine.

comment:8 Changed 4 years ago by pkienzle

At theta=0 phi and psi are indeed identical. Remember that the equation is R = Rz(phi) Ry(theta) Rz(psi), so given theta=0 this is R = Rz(phi) I Rz(psi) = Rz(phi + psi). That is, both serve to rotate around z in the same direction.

To show that they are indeed different try at theta=90:

./sascomp -double! -2d elliptical_cylinder theta=90 phi=45,0 psi=0,45 length=500 radius_minor=200 axis_ratio=2

comment:9 Changed 4 years ago by richardh

Hi Paul, the diagram we are using for asymmetric particles in the docs says that with particle in its starting position (theta=phi=psi=0), long c axis along beam (z), the theta rotation is about the b axis (vertical, y) and the phi rotation about the a axis of the particle (horizontal, x). The psi rotation is about the beam axis.

In the starting position both the theta and phi rotations should maintain a left-right symmetry in the 2d pattern, only the psi rotation should rotate the pattern. This used to work fine so I think that something has changed.

If the latest system (Tait-Bryan) is somehow better then all the diagrams in the docs will need to be changed.

comment:10 Changed 4 years ago by richardh

Hi Paul,

Sorry, I see that I was indeed confused (again) by my own diagram.

You were correct. I will close this ticket.

Richard

comment:11 Changed 4 years ago by richardh

  • Resolution set to fixed
  • Status changed from new to closed

Note to self, must not get the rotations and the jitter distributions mixed up.

Close ticket.

Note: See TracTickets for help on using tickets.