{"action":"closed","issue":{"url":"https://api.github.com/repos/neutronpy/neutronpy/issues/54","repository_url":"https://api.github.com/repos/neutronpy/neutronpy","labels_url":"https://api.github.com/repos/neutronpy/neutronpy/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/neutronpy/neutronpy/issues/54/comments","events_url":"https://api.github.com/repos/neutronpy/neutronpy/issues/54/events","html_url":"https://github.com/neutronpy/neutronpy/issues/54","id":138709356,"number":54,"title":"signs of resolution matrix elements?","user":{"login":"js54434","id":6426598,"avatar_url":"https://avatars.githubusercontent.com/u/6426598?v=3","gravatar_id":"","url":"https://api.github.com/users/js54434","html_url":"https://github.com/js54434","followers_url":"https://api.github.com/users/js54434/followers","following_url":"https://api.github.com/users/js54434/following{/other_user}","gists_url":"https://api.github.com/users/js54434/gists{/gist_id}","starred_url":"https://api.github.com/users/js54434/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/js54434/subscriptions","organizations_url":"https://api.github.com/users/js54434/orgs","repos_url":"https://api.github.com/users/js54434/repos","events_url":"https://api.github.com/users/js54434/events{/privacy}","received_events_url":"https://api.github.com/users/js54434/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neutronpy/neutronpy/labels/component:%20resolution","name":"component: resolution","color":"bfe5bf"},{"url":"https://api.github.com/repos/neutronpy/neutronpy/labels/documentation","name":"documentation","color":"000000"},{"url":"https://api.github.com/repos/neutronpy/neutronpy/labels/priority:%20medium","name":"priority: medium","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"pseudocubic","id":1757056,"avatar_url":"https://avatars.githubusercontent.com/u/1757056?v=3","gravatar_id":"","url":"https://api.github.com/users/pseudocubic","html_url":"https://github.com/pseudocubic","followers_url":"https://api.github.com/users/pseudocubic/followers","following_url":"https://api.github.com/users/pseudocubic/following{/other_user}","gists_url":"https://api.github.com/users/pseudocubic/gists{/gist_id}","starred_url":"https://api.github.com/users/pseudocubic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pseudocubic/subscriptions","organizations_url":"https://api.github.com/users/pseudocubic/orgs","repos_url":"https://api.github.com/users/pseudocubic/repos","events_url":"https://api.github.com/users/pseudocubic/events{/privacy}","received_events_url":"https://api.github.com/users/pseudocubic/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-03-05T19:08:49Z","updated_at":"2016-03-05T22:49:44Z","closed_at":"2016-03-05T22:49:44Z","body":"I'm trying to generate the resolution matrix using both neutronpy and \"reselps\", but I'm getting some of the matrix elements to be of the opposite sign. \r\n\r\nneutronpy code:\r\n```\r\nfrom neutronpy.resolution import Sample\r\nfrom neutronpy.resolution import Instrument\r\n\r\nefixed = 14.7\r\nhcol = [50, 80, 50, 120]\r\nvcol = [300, 300, 300, 300]\r\nana='PG(002)'\r\nmono='PG(002)'\r\n\r\nu = [1., 0., 0.]\r\nv = [1., 0., 0.]\r\nsample = Sample(4., 4., 4.,\r\n                             90, 90, 90,\r\n                             mosaic=60.,\r\n                             u=u, v=v)\r\nq = np.array([[2.], [0.], [0.], [4.]])\r\nsample.vmosaic=1.\r\nEXP = Instrument(efixed=efixed, sample=sample, hcol=hcol, vcol=vcol,\r\n                             ana=ana, mono=mono,\r\n                             mono_mosaic=35., ana_mosaic=35.)\r\nEXP.calc_resolution(q)\r\nprint(EXP.RMS)\r\n```\r\n\r\nneutronpy result:\r\n```\r\n[[ 2265.98963477   299.07421529     0.           -43.68486242]\r\n [  299.07421529  1667.51953788     0.          -145.49237605]\r\n [    0.             0.            90.07679538     0.        ]\r\n [  -43.68486242  -145.49237605     0.            14.42250498]]\r\n```\r\n\r\nWith similar parameters,\r\n```\r\nepm = 1\r\nep = 1\r\nalz, alm, ala, al3 = 50, 80, 50, 120\r\ntm, ta = 1.87325, 1.87325\r\netam, etaa = 35., 35.\r\nefix = -14.7\r\netash = 60.\r\netasv = 1.\r\nsource = 1\r\nvbetz, vbet1, vbet2, vbet3 = 300, 300, 300, 300\r\n```\r\n\r\nthe reselps code has this result:\r\n```\r\n[[ 2265.99375019  -299.07567774   -43.6850311      0.        ]\r\n [ -299.07567774  1667.52554288   145.49293785     0.        ]\r\n [  -43.6850311    145.49293785    14.42256067     0.        ]\r\n [    0.             0.             0.            90.07572559]]\r\n```\r\n(the z and energy indices are swapped). It looks like the y-row and y-column are multiplied by -1. Can you think of a reason for this discrepancy? Is the \"y\" direction defined as clockwise relative to Q rather than counterclockwise as in the reselps code?\r\n\r\n"}}