cherab / core

The core source repository for the Cherab project.
https://www.cherab.info
Other
45 stars 24 forks source link

Support custom line shape models in BeamCXLine. #401

Closed vsnever closed 1 year ago

vsnever commented 1 year ago

This PR fixes #394 by adding lineshape, lineshape_args and lineshape_kwargs arguments to BeamCXLine class. The user can now switch from the default GaussianLine model to something else, such as ZeemanMultiplet.

To give some context, there are projects of tokamaks with high magnetic field (B0>8T), e.g. SPARC, TRT, and some of them will have CXRS diagnostics. With such strong magnetic fields, Zeeman splitting cannot be neglected anymore even when calculating the active CXRS signal.

jacklovell commented 1 year ago

Can you add some tests for both the default lineshape and a custom lineshape?

vsnever commented 1 year ago

Can you add some tests for both the default lineshape and a custom lineshape?

Done. I mocked up some atomic data to test the BeamCXLine model. I think we can use this approach for other emission models as well.