Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Thomson module #2591

Open
5 tasks
pheuer opened this issue Mar 21, 2024 · 0 comments
Open
5 tasks

Improve Thomson module #2591

pheuer opened this issue Mar 21, 2024 · 0 comments
Assignees
Labels
feature request Issues requesting a new feature or enhancement plasmapy.diagnostics Related to the plasmapy.diagnostics subpackage

Comments

@pheuer
Copy link
Member

pheuer commented Mar 21, 2024

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-module

This file and associated tests is getting out of hand - we should create a diagnostics/thomson module and break the file
into spectrum and fitting 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

image
(Dustin Froula's 2011 book)

Where:

  • $\omega$ is the frequency
  • $P_i$ is the incident power, $\omega_i$ is the incident frequency, and $A$ is the cross-sectional area of the incident beam.
  • $r_0$ is the classical electron radius
  • $\hat s$ is the scattering vector, and $E_{i0}$ is the electric field orientation
  • $N$ is the number of electrons being scattered of of, or $n_e$*the scattering volume.
  • $S(k,w)$ is the spectral density already calculated in PlasmaPy

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.

  • Implement scattered power lite function normalized_scattered_power_lite that just adds the $(1 + 2*\omega/\omega_i)$ term and normalizes.
  • Implement normalized_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?)

  • Implement the wrapper function with units scattered_power that includes all the terms above

Fit 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

@pheuer pheuer added the feature request Issues requesting a new feature or enhancement label Mar 21, 2024
@pheuer pheuer self-assigned this Mar 21, 2024
@namurphy namurphy added the plasmapy.diagnostics Related to the plasmapy.diagnostics subpackage label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues requesting a new feature or enhancement plasmapy.diagnostics Related to the plasmapy.diagnostics subpackage
Projects
HEDP Diagnostics
Awaiting triage
Development

No branches or pull requests

2 participants