{"action":"created","issue":{"url":"https://api.github.com/repos/kklmn/xrt/issues/24","repository_url":"https://api.github.com/repos/kklmn/xrt","labels_url":"https://api.github.com/repos/kklmn/xrt/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/kklmn/xrt/issues/24/comments","events_url":"https://api.github.com/repos/kklmn/xrt/issues/24/events","html_url":"https://github.com/kklmn/xrt/issues/24","id":354274458,"node_id":"MDU6SXNzdWUzNTQyNzQ0NTg=","number":24,"title":"wave caculation and coherence analysis issue","user":{"login":"goxrt","id":41823786,"node_id":"MDQ6VXNlcjQxODIzNzg2","avatar_url":"https://avatars1.githubusercontent.com/u/41823786?v=4","gravatar_id":"","url":"https://api.github.com/users/goxrt","html_url":"https://github.com/goxrt","followers_url":"https://api.github.com/users/goxrt/followers","following_url":"https://api.github.com/users/goxrt/following{/other_user}","gists_url":"https://api.github.com/users/goxrt/gists{/gist_id}","starred_url":"https://api.github.com/users/goxrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goxrt/subscriptions","organizations_url":"https://api.github.com/users/goxrt/orgs","repos_url":"https://api.github.com/users/goxrt/repos","events_url":"https://api.github.com/users/goxrt/events{/privacy}","received_events_url":"https://api.github.com/users/goxrt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-27T11:02:44Z","updated_at":"2018-08-27T11:43:42Z","closed_at":null,"author_association":"NONE","body":"Hi, I am now trying using the coherence analysis. The results seem to be different from the theoretical. In my simulaiton, I made following setting:\r\n \r\n(1)    uniformRayDensity = True\r\n   filamentBeam = True\r\n(2) The wave generated by the source are directly projected on the screen:\r\n            waveOnScreen = beamLine.fsmExp.prepare_wave(\r\n            beamLine.source, beamLine.fsmExpX, beamLine.fsmExpZ)\r\n            beamSource = beamLine.source.shine(wave = waveOnScreen, fixedEnergy=E0, withAmplitudes=True)\r\n            outDict['beamFSMExp_{0:02d}'.format(ic)] = waveOnScreen      \r\n(3) The field is computed following the exmaple of the XRT.\r\n \r\nI don’t understand how the “Es = complexPlotPCAs.field3D” works, I tried to find this code in the source file but unsuccessfulll. Is the Es from the beamLine.source.shine for each repeat?\r\nIn addition, for the wave simulation, I really don’t catch the difference between the filamentBeam =true and false. Are they same if we have a very many repeats. Thanks"},"comment":{"url":"https://api.github.com/repos/kklmn/xrt/issues/comments/416199893","html_url":"https://github.com/kklmn/xrt/issues/24#issuecomment-416199893","issue_url":"https://api.github.com/repos/kklmn/xrt/issues/24","id":416199893,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjE5OTg5Mw==","user":{"login":"kklmn","id":17322580,"node_id":"MDQ6VXNlcjE3MzIyNTgw","avatar_url":"https://avatars2.githubusercontent.com/u/17322580?v=4","gravatar_id":"","url":"https://api.github.com/users/kklmn","html_url":"https://github.com/kklmn","followers_url":"https://api.github.com/users/kklmn/followers","following_url":"https://api.github.com/users/kklmn/following{/other_user}","gists_url":"https://api.github.com/users/kklmn/gists{/gist_id}","starred_url":"https://api.github.com/users/kklmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kklmn/subscriptions","organizations_url":"https://api.github.com/users/kklmn/orgs","repos_url":"https://api.github.com/users/kklmn/repos","events_url":"https://api.github.com/users/kklmn/events{/privacy}","received_events_url":"https://api.github.com/users/kklmn/received_events","type":"User","site_admin":false},"created_at":"2018-08-27T11:43:42Z","updated_at":"2018-08-27T11:43:42Z","author_association":"OWNER","body":"plot.field3D is a stack of 2D fields per electron (repeat). It has a shape (repeats, nx, ny) and is supposed to be fed to [xrt.backends.raycing.coherence.calc_eigen_modes_PCA()](https://xrt.readthedocs.io/raycing.html#xrt.backends.raycing.coherence.calc_eigen_modes_PCA).\r\n\r\nFilament beam is a single electron emission, where the electron has random lateral and angular shifts within the given emittance distributions ε<sub>x</sub> and ε<sub>z</sub> and an energy shift within the given energy spread. If filamentBeam == False, each ray in the beam has its own set of those random samples; you can't do wave propagation then. If you propagate in rays then yes, the results with and without filamentBeam will be equal at many repeats. \r\n\r\nPlease also read the section [Coherence analysis and related plotting](https://xrt.readthedocs.io/raycing.html#module-xrt.backends.raycing.coherence). It refers to SoftiMAX examples and also to a test ...\\tests\\raycing\\test_coherent_fraction_stack.py that you may want to scrutimnize."}}
{"actor":{"display_login":"kklmn"}}