How komochristian/felsim works
FELsim is a web application for configuring and analyzing free-electron-laser beamlines. The user-facing workflow centers on editing a beamline and particle/beam settings, then viewing beam-parameter plots and simulation results. The backend includes beamline physics, lattice import, optimization, and several simulation-code integrations. Source excerpts establish selected module dependencies, but the API-to-UI request path and several unsampled capabilities are not verified; those subsystems are included without guessed call chains.
Main entry points: App.jsx Application UI · cosySimulator.py COSY simulator · AlgebraicOptimization.py Algebraic optimization · rftrackAdapter.py RF-Track adapter
Components 30
Web interface
- Application UI
fel-app/src/App.jsx - Beamline editor
fel-app/src/App.jsx - Beam settings
fel-app/src/components/BeamSettings/BeamSettings.jsx - Particle settings
fel-app/src/components/ParticleSettings/ParticleSettings.jsx - Plots and navigation
fel-app/src/components/LineGraph/LineGraph.jsx - Parameter analysis
fel-app/src/components/ModalContent/ModalContent.jsx - Beamline view
fel-app/src/components/ScrollableBeam/ScrollableBeam.jsx
Backend entry
- FEL API
backend/felAPI.py
Beam physics
- Beamline elements
backend/beamline.py - Beam evolution
backend/beamEvolution.py - Electron beam
backend/ebeam.py - Physical constants
backend/physicalConstants.py - Algebraic optimization
backend/AlgebraicOptimization.py - Beam optimizer
backend/beamOptimizer.py - Beamline schematic
backend/schematic.py
Simulation
- Simulator interface
backend/simulatorBase.py - Simulator selection
backend/simulatorFactory.py - Multi-code simulation
backend/multiCodeSimulator.py - COSY simulator
backend/cosySimulator.py - COSY results
backend/cosyResultsReader.py - COSY particle simulator
backend/cosyParticleSimulator.py - RF-Track adapter
backend/rftrackAdapter.py - Xsuite adapter
backend/xsuiteAdapter.py - FELsim adapter
backend/felsimAdapter.py
Lattice inputs
- Lattice loading
backend/latticeLoaderBase.py - Beamline builder
backend/beamlineBuilder.py - Excel lattice import
backend/excelToJson.py - YAML lattice import
backend/yamlLatticeLoader.py - JSON lattice import
backend/jsonLatticeLoader.py
Other components
- FELsim user
Connections 22
- FELsim user → Application UI: uses
- Application UI → Beamline editor: renders
fel-app/src/App.jsx - Application UI → Beam settings: renders
fel-app/src/App.jsx - Application UI → Particle settings: renders
fel-app/src/App.jsx - Application UI → Plots and navigation: renders
fel-app/src/App.jsx - Application UI → Parameter analysis: renders
fel-app/src/App.jsx - Application UI → FEL API: exchanges data
- Parameter analysis → Beamline view: renders
fel-app/src/components/ModalContent/ModalContent.jsx - FEL API → Beamline elements: dispatches
- FEL API → Simulator selection: selects
- Algebraic optimization → Beamline elements: uses
backend/AlgebraicOptimization.py - Algebraic optimization → Beamline schematic: uses
backend/AlgebraicOptimization.py - Algebraic optimization → Electron beam: uses
backend/AlgebraicOptimization.py - Beamline elements → Physical constants: uses
backend/beamline.py - COSY simulator → Beamline builder: uses
backend/cosySimulator.py - COSY simulator → COSY results: reads results
backend/cosySimulator.py - COSY simulator → Physical constants: uses
backend/cosySimulator.py - COSY particle simulator → COSY simulator: uses
backend/cosyParticleSimulator.py - COSY particle simulator → Physical constants: uses
backend/cosyParticleSimulator.py - RF-Track adapter → Simulator interface: implements
backend/rftrackAdapter.py - RF-Track adapter → Beam evolution: uses
backend/rftrackAdapter.py - RF-Track adapter → Lattice loading: uses
backend/rftrackAdapter.py