Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to simulate tapered undulator in srw_python? #6

Open
tyjisinap opened this issue Jan 27, 2016 · 1 comment
Open

How to simulate tapered undulator in srw_python? #6

tyjisinap opened this issue Jan 27, 2016 · 1 comment

Comments

@tyjisinap
Copy link

It is easy to simulate tapered undulator in the srw_igor. is there a similar function in srw_python?

@ochubar
Copy link
Owner

ochubar commented Feb 3, 2016

Hello Yajun,

Yes, it is indeed easy to calculate spectral flux from a tapered undulator using SRW under Igor Pro (srw_igor). One has to specify undulator type as “tapered” in a drop-down box and define a taper parameter (Nu*dE/E) in the dialog accessible from Igor menu:
SRWE->Undulator->Periodic Magnetic Field->Create and Modify…
as illustrated in the attached graphic file. Then the spectral flux can be calculated the same way as for a non-tapered undulator, i.e. by:
SRWE->Undulator->Compute Stokes…

Unfortunately, this was not yet ported to the Python version of SRW (as of Feb. 2016).

However, both in Igor and in Python versions, it is possible to define “arbitrary” tabulated magnetic field (e.g. the one of a tapered undulator), and calculate either single-electron spectral flux per unit surface, or a “multi-electron” one (using the “macro-particle” method). In “srw_igor”, this latter calculation can be done using “proc SrwIntArbMCCreate” (which can be found in “SRW Radiation StokesArb.ipf” file). In “srw_python”, this can be done with “def srwl_wfr_emit_prop_multi_e” function (which is defined in “srwlib.py” file); it can run in “parallel” mode (via MPI/mpi4py).

OC

From: Yajun Tong [mailto:[email protected]]
Sent: Tuesday, January 26, 2016 8:36 PM
To: ochubar/SRW [email protected]
Subject: [SRW] How to simulate tapered undulator in srw_python? (#6)

It is easy to simulate tapered undulator in the srw_igor is there a similar function in srw_python?


Reply to this email directly or view it on GitHubhttps://github.com//issues/6.

himanshugoel2797 referenced this issue in himanshugoel2797/SRW Apr 28, 2022
ochubar pushed a commit that referenced this issue May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants