PaNOSC-ViNYL / SimEx

Start-to-end photon experiment simulation platform
https://simex.readthedocs.io/
GNU General Public License v3.0
26 stars 25 forks source link

GenesisPhotonSource error #218

Closed JunCEEE closed 4 years ago

JunCEEE commented 4 years ago

Traceback (most recent call last): File "GenesisPhotonSourceTest.py", line 134, in testPrepareRun xfel_source._prepareGenesisRun() File "/gpfs/exfel/data/user/juncheng/simex-openmpi/Sources/python/SimEx/Calculators/GenesisPhotonSource.py", line 75, in _prepareGenesisRun itdp=self.parameters['is_time_dependent'] ) TypeError: generate_input() missing 1 required positional argument: 'undulator'

genesis.generate_input requires positional argument: 'undulator', but at Sources/python/SimEx/Calculators/GenesisPhotonSource.py:73, the argument is not provided.

This can be fixed by correcting the variable name, but then the second one popped up:

Traceback (most recent call last):
  File "GenesisPhotonSourceTest.py", line 134, in testPrepareRun
    xfel_source._prepareGenesisRun()
  File "/gpfs/exfel/data/user/juncheng/simex-openmpi/Sources/python/SimEx/Calculators/GenesisPhotonSource.py", line 76, in _prepareGenesisRun
    itdp=self.parameters['is_time_dependent'],
  File "/gpfs/exfel/data/user/juncheng/miniconda3/envs/simex-openmpi/lib/python3.7/ocelot/adaptors/genesis.py", line 1491, in generate_input
    rxbeam = np.nanmax(np.sqrt(inp.beam.beta_x * inp.beam.emit_x))
AttributeError: 'NoneType' object has no attribute 'beta_x'