{ "info": { "author": "Sophie Thery", "author_email": "sophie.thery@esrf.fr", "bugtrack_url": null, "classifiers": [], "description": "=====\npySRU\n=====\n\nWARNING: PROJECT UNDER DEVELOPMENT!!\n\nSynchrotron Radiation Undulator emission in python\n\nMain development website: https://github.com/SophieTh/und_Sophie_2016\n\nA toolbox to calculate the emission of radiation by undulators in storage rings. \n\n\nThis software library implements formulas to calculate the emission of radiation by undulators in storage rings, and more\ngenerally, the emission of a relativistic electron in an arbitrary magnetic field.\n\nThe software is written in pure python, using standard packages as numpy and scipy. It uses matplotlib for plots, but it is not required for calculations.\n\nLicense\n-------\n\nThis code is relased under the MIT license as detailed in the LICENSE file.\n\nInstallation\n------------\n\nTo build the library for python use, just use the ``python setup.py install`` approach.\n\n\nExample\n-------\n\nThe file Simulations.py contains a number of simulations. For example the following code created the emission of an undulator like in fig 2.5 of the X-ray Data Booklet (http://xdb.lbl.gov/Section2/Sec_2-1.html)\n\nThis piece of Python code shows how the library can be used via its python binding.\n\n.. code-block:: python\n\n from pySRU.ElectronBeam import ElectronBeam\n from pySRU.MagneticStructureUndulatorPlane import MagneticStructureUndulatorPlane as Undulator\n from pySRU.Simulation import create_simulation\n from pySRU.TrajectoryFactory import TRAJECTORY_METHOD_ANALYTIC,TRAJECTORY_METHOD_ODE\n from pySRU.RadiationFactory import RADIATION_METHOD_NEAR_FIELD, RADIATION_METHOD_APPROX_FARFIELD\n \n print(\"======================================================================\")\n print(\"====== Undulator from X-ray data booklet =======\")\n print(\"====== fig 2.5 in http://xdb.lbl.gov/Section2/Sec_2-1.html =======\")\n print(\"======================================================================\")\n \n # note that the flux in the reference fig 2.6 is a factor 10 smaller than the calculated here.\n # This factor comes from the units:\n # here: phot / s / A / 0.1%bw / (mrad)^2\n # ref : phot / s / A / 1%bw / (0.1 mrad)^2\n \n undulator_test = Undulator(K=1.87, period_length=0.035, length=0.035 * 14)\n electron_beam_test = ElectronBeam(Electron_energy=1.3, I_current=1.0)\n \n simulation_test = create_simulation(magnetic_structure=undulator_test,electron_beam=electron_beam_test,\n magnetic_field=None, photon_energy=None,\n traj_method=TRAJECTORY_METHOD_ANALYTIC,Nb_pts_trajectory=None,\n rad_method=RADIATION_METHOD_APPROX_FARFIELD, Nb_pts_radiation=101,\n initial_condition=None, distance=None,XY_are_list=False,X=None,Y=None)\n \n \n simulation_test.print_parameters()\n \n simulation_test.trajectory.plot_3D(title=\"Electron Trajectory\")\n \n simulation_test.radiation.plot(title=\"Flux in far field vs angle\")\n \n\n.. image:: https://github.com/SophieTh/und_Sophie_2016/blob/master/doc/radiation_xraybooklet.jpeg\n\nResult link: https://github.com/SophieTh/und_Sophie_2016/blob/master/doc/radiation_xraybooklet.jpeg\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/SophieTh/und_Sophie_2016/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "pySRU", "package_url": "https://pypi.org/project/pySRU/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pySRU/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/SophieTh/und_Sophie_2016/" }, "release_url": "https://pypi.org/project/pySRU/0.5.3/", "requires_dist": null, "requires_python": null, "summary": "Python synchrotron undulator calcution", "version": "0.5.3" }, "last_serial": 2325022, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "1dac15b9420aced929b432d8cb74d8ae", "sha256": "0710093ee9648f58d6efb8b02e292941f0483b4eeeddaebb7cb7295e3109a7d6" }, "downloads": -1, "filename": "pySRU-0.5.tar.gz", "has_sig": false, "md5_digest": "1dac15b9420aced929b432d8cb74d8ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30991, "upload_time": "2016-08-18T12:06:15", "url": "https://files.pythonhosted.org/packages/60/57/14fbad5b2c9edb92fbf288e178bc55eb12fb51372e2121d332d88fd33b9d/pySRU-0.5.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "d0d6e442763ba0ecc66180f13df51354", "sha256": "6e9824c8d9b4564729ec7ef38bbb0193e65ba953efda88b0b3f37be935d4b333" }, "downloads": -1, "filename": "pySRU-0.5.1.tar.gz", "has_sig": false, "md5_digest": "d0d6e442763ba0ecc66180f13df51354", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30970, "upload_time": "2016-08-18T12:39:18", "url": "https://files.pythonhosted.org/packages/e3/21/193cdc06107e200a85aeeed4dfb289252eccd2b117a4c419291ef656ee9e/pySRU-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "1bc5dd37d99e6f4c632960ecd8817508", "sha256": "1f01a01fc9664b8de28c6e5f05dd677b91a8aaef524d43ea972a1fd8fb53a32c" }, "downloads": -1, "filename": "pySRU-0.5.2.tar.gz", "has_sig": false, "md5_digest": "1bc5dd37d99e6f4c632960ecd8817508", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30879, "upload_time": "2016-08-18T12:57:59", "url": "https://files.pythonhosted.org/packages/24/1c/01570e0a09ba9499e11c537279d18e7a4d998e86f1cabaeeefd8cfb6ff18/pySRU-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "41e26c21c330a4b57141916f83972c2e", "sha256": "fe4cc18af9193a7f63ea2251eb1d38ea41329fb7f1e9ed8e8af4bd4051af0ef6" }, "downloads": -1, "filename": "pySRU-0.5.3.tar.gz", "has_sig": false, "md5_digest": "41e26c21c330a4b57141916f83972c2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29668, "upload_time": "2016-09-05T07:11:20", "url": "https://files.pythonhosted.org/packages/2b/81/96e9cee06e81e71ff9dcb4c5c23cc7c640656fe28f7f0834d5bd1181a4aa/pySRU-0.5.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "41e26c21c330a4b57141916f83972c2e", "sha256": "fe4cc18af9193a7f63ea2251eb1d38ea41329fb7f1e9ed8e8af4bd4051af0ef6" }, "downloads": -1, "filename": "pySRU-0.5.3.tar.gz", "has_sig": false, "md5_digest": "41e26c21c330a4b57141916f83972c2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29668, "upload_time": "2016-09-05T07:11:20", "url": "https://files.pythonhosted.org/packages/2b/81/96e9cee06e81e71ff9dcb4c5c23cc7c640656fe28f7f0834d5bd1181a4aa/pySRU-0.5.3.tar.gz" } ] }