Improve Thomson module #2591
Labels
feature request
Issues requesting a new feature or enhancement
plasmapy.diagnostics
Related to the plasmapy.diagnostics subpackage
Projects
The Thomson scattering module is getting a good amount of users, and some consistent feature requests are emerging. I will start collecting them here.
Split
thomson.py
into its own sub-moduleThis file and associated tests is getting out of hand - we should create a
diagnostics/thomson
module and break the fileinto
spectrum
andfitting
files.Add scattered power wrapper for spectral density function
The scattered power is a function of wavelength and some constants times the spectral density function currently implemented in PlasmaPy. However, having it separately would be very helpful. Ref: #1236
(Dustin Froula's 2011 book)
Where:
Of these, only the term$(1 + 2*\omega/\omega_i)$ term actually changes the shape of the spectrum, so it would be worth having a lite function including only this term for fitting purposes.
To do fitting (see below) we need a lite function for scattered power, so unfortunately this can't just be a wrapper around
spectral_density
.normalized_scattered_power_lite
that just adds thenormalized_scattered_power
, which is the validated version of the lite function. Lite functions can only exist along side a regular validated function.This should be one PR
Another PR could implement the full scattered power expression, in case someone wants to estimate the absolute scattered power (for estimating signal level, maybe?)
scattered_power
that includes all the terms aboveFit scattered power rather than spectral density
Scattered power is actually what is measured in experiments, so a number of users have requested that this be the quantity that the Thomson scattering fitting model actually fits. Once this function is implemented, this should be a straightforward swap.
Include additional parameters for fitting
There are some additional experimental parameters that it would make sense to include in fitting
ion_z
andion_mass
to be parameters that can be fit. (Addressed in Several improvements to OTS fitting #2636)The text was updated successfully, but these errors were encountered: