-
Notifications
You must be signed in to change notification settings - Fork 32
Exchange SRW Sirepo simulations
Users can exchange SRW/Sirepo simulations in several formats:
- a Python script;
- a JSON file;
- a zip-archive;
- a self-extracting simulation.
We have found that users want the ability to download valid Python scripts, which can then be specialized to implement more sophisticated simulations — for example, capabilities that the GUI does not yet support. The same menu provides a way to export a Python script used for execution of the report — Export Python File menu item:
This allows the end user to run an SRW simulation from the command line. Hence, the expert user is benefitted by the GUI just as much as the novice user, and the GUI never inhibits or limits what an X-ray scientist can do with SRW.
As an accompanying tool, we have implemented exporting of the JSON files, which fully describe the simulation — Export JSON Data File menu item:
This assures portability of Sirepo simulations.
In many cases SRW simulations involve additional files, e.g. mirror height profiles and magnetic measurements data for the tabulated undulator, which cannot be exported as a single Python file. For that purpose, we implemented exporting of a zip-archive with Python, JSON and all related data files — Export as Zip menu item:
Also, an advanced exporting feature of a self-extracting simulation in HTML format was implemented — Self-Extracting Simulation menu item to allow a one-click importing to a remote server:
To provide a robust mechanism for sharing the simulations across multiple installations of Sirepo and/or SRW, we complemented the exporting capabilities by the advanced importing features. Currently, Sirepo accepts importing of the standardly formatted "Virtual Beamline" Python scripts as well as previously exported JSON files. When the user attempts to import a Python script, optional command-line arguments could be provided (for instance, to select the desired beamline layout to import):
Import of a previously exported simulation in a form of a zip-archive can be performed in the same manner.
The best way to backup your calculations is to use zip-archive exporting feature.
- Go to the simulations list page, click on the simulation to save and press Export as Zip.
The exported zip-file can be imported to the same Sirepo server, or even to another server, which provides a great way to transfer simulations between the servers.
- Go to the desired Sirepo server, e.g. https://beta.sirepo.com/light.
- Go to the expert mode by clicking Expert users only button.
- On the simulations list page click Import button.
- In the pop-up window click Choose File/Browse button, select the desired zip-archive (or JSON file) and click Import File button:
- You will be redirected to the page with the imported simulation.
- Export to Python may be useful, but there is no 100% guarantee that you will import it back to Sirepo correctly since the names of optical elements will be replaced by default values and some parameters may be processed incorrectly.
License: http://www.apache.org/licenses/LICENSE-2.0.html
Copyright ©️ 2015–2020 RadiaSoft LLC. All Rights Reserved.
- Activait
- Controls
- elegant
- FLASH
- Genesis
- JSPEC
- JupyterHub
- MAD-X
- OPAL
- Radia
- Shadow
- Synchrotron Radiation Workshop (SRW)
- Warp PBA
- Warp VND
- Zgoubi
- Authentication and Account Creation
- How Your Sirepo Workspace Works
- Navigating the Sirepo Simulations Interface
- How to upload a lattice file
- How to share a Sirepo simulation via URL
- How Example simulations work
- How to report a bug in Sirepo
- Using lattice files in Sirepo
- Resetting an Example Simulation to default
- Backup SRW Sirepo simulations
- SRW Aperture
- SRW Brilliance Report
- SRW Circular Cylinder Mirror
- SRW CRL
- SRW Crystal
- SRW Electron Beam
- SRW Elliptical Cylinder Mirror
- SRW Fiber
- SRW Flux
- SRW Fully Coherent Gaussian Beam
- SRW Import Python or JSON Simulation File
- SRW Initial Wavefront Simulation Grid
- SRW Intensity Report
- SRW Planar Mirror
- SRW Power Density Report
- SRW Propagation Parameters
- SRW Single Electron Spectrum Report
- SRW Spherical Mirror
- SRW Toroid Mirror
- SRW Watchpoint
- SRW Additional Documentation