Thomson Scattering
Example code demonstrating the use of ThomsonScattering can be found in the
jupyter notebook demo.
- class sims.instruments.ThomsonScattering(R: ndarray, z: ndarray, weights: ndarray, interface: SolpsInterface = None, measurements: dict[str, numpy.ndarray] = None)
Synthetic instrument model for Thomson scattering.
- Parameters
R – Radius positions of the sampling points as a 2D numpy array of shape
(num_channels, num_samples).z – z-positions of the sampling points as a 2D numpy array of shape
(num_channels, num_samples).weights – weighting values of the sampling points as a 2D numpy array of shape
(num_channels, num_samples).interface – An instance of the
SolpsInterfaceclass. If the interface cannot be passed when creating the instance ofThomsonScattering, it can be specified later using theupdate_interfacemethod.measurements – A dictionary containing Thomson-scattering measurement data to which the synthetic instrument predictions will be compared. The data should be given as 1D numpy arrays under the keys ‘te_data’, ‘te_err’, ‘ne_data’ and ‘ne_err’. This keyword argument is required in order to use the
log_likelihoodmethod.
- log_likelihood(likelihood=<function gaussian_likelihood>) float
Calculate the log-likelihood of the experimental data for the given SOLPS data.
- Parameters
likelihood – The likelihood function used in the calculation. By default, a Gaussian likelihood is used. Other likelihoods can be imported from the
sims.likelihoodsmodule and passed to change which likelihood is used.- Returns
The log-likelihood
- update_interface(interface: SolpsInterface)
Set the SOLPS data which will be used by the instrument model by passing an instance of
SolpsInterfacefrom thesims.interfacemodule.- Parameters
interface – An instance of
SolpsInterfacefrom thesims.interfacemodule.