{"action":"closed","issue":{"url":"https://api.github.com/repos/obspy/obspy/issues/1158","repository_url":"https://api.github.com/repos/obspy/obspy","labels_url":"https://api.github.com/repos/obspy/obspy/issues/1158/labels{/name}","comments_url":"https://api.github.com/repos/obspy/obspy/issues/1158/comments","events_url":"https://api.github.com/repos/obspy/obspy/issues/1158/events","html_url":"https://github.com/obspy/obspy/issues/1158","id":113661504,"number":1158,"title":"stream.rotate('NE->RT') is swapping e and n components","user":{"login":"amir-allam","id":6842748,"avatar_url":"https://avatars.githubusercontent.com/u/6842748?v=3","gravatar_id":"","url":"https://api.github.com/users/amir-allam","html_url":"https://github.com/amir-allam","followers_url":"https://api.github.com/users/amir-allam/followers","following_url":"https://api.github.com/users/amir-allam/following{/other_user}","gists_url":"https://api.github.com/users/amir-allam/gists{/gist_id}","starred_url":"https://api.github.com/users/amir-allam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amir-allam/subscriptions","organizations_url":"https://api.github.com/users/amir-allam/orgs","repos_url":"https://api.github.com/users/amir-allam/repos","events_url":"https://api.github.com/users/amir-allam/events{/privacy}","received_events_url":"https://api.github.com/users/amir-allam/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-10-27T19:22:26Z","updated_at":"2016-05-27T13:29:16Z","closed_at":"2016-05-27T13:29:16Z","body":"I acquire data from IRIS via Client, demean, detrend, and deconvolve instrument response. Then I add back_azimuth to each trace and use stream.rotate. The result is wrong and it appears to be that the e and n components have been swapped. In the attached png, magenta is rotation to RT in sac, blue is in matlab, and red is using obspy.signal.rotate_NE_RT directly, passing each trace as an argument. All of these methods match nicely. However, black is the result of stream.rotate('NE->RT'); green is if I swap e and n in the arguments to a matlab rotation script. So, somehow the components are being passed in the wrong order to rotate_NE_RT() when it is called by stream.rotate()\r\n![rotate_compare_obspy](https://cloud.githubusercontent.com/assets/6842748/10769663/bf3499a8-7cac-11e5-908f-29bf31659873.png)\r\n\r\n"}}
{"actor":{"display_login":"megies"}}