# PIC4rl-gym: a ROS2 modular framework for Robots Autonomous Navigation with
Deep Reinforcement Learning

Mauro Martini
Department of Electronics
and Telecommunications (DET)
Politecnico di Torino
Torino, Italy
<EMAIL_ADDRESS>
&Andrea Eirale
Department of Electronics
and Telecommunications (DET)
Politecnico di Torino
Torino, Italy
<EMAIL_ADDRESS>&Simone Cerrato
Department of Electronics
and Telecommunications (DET)
Politecnico di Torino
Torino, Italy
<EMAIL_ADDRESS>
&Marcello Chiaberge
Department of Electronics
and Telecommunications (DET)
Politecnico di Torino
Torino, Italy
<EMAIL_ADDRESS>

###### Abstract

Learning agents can optimize standard autonomous navigation improving
flexibility, efficiency, and computational cost of the system by adopting a
wide variety of approaches. This work introduces the PIC4rl-gym, a fundamental
modular framework to enhance navigation and learning research by mixing ROS2
and Gazebo, the standard tools of the robotics community, with Deep
Reinforcement Learning (DRL). The paper describes the whole structure of the
PIC4rl-gym, which fully integrates DRL agent’s training and testing in several
indoor and outdoor navigation scenarios and tasks. A modular approach is
adopted to easily customize the simulation by selecting new platforms,
sensors, or models. We demonstrate the potential of our novel gym by
benchmarking the resulting policies, trained for different navigation tasks,
with a complete set of metrics.

_K_ eywords Mobile Robots $\cdot$ Autonomous Navigation $\cdot$ Deep
Reinforcement Learning $\cdot$ ROS2 $\cdot$ Gazebo $\cdot$ Simulation $\cdot$
Gym

##  1 Introduction

Autonomous navigation algorithms aim at providing mobile robots with efficient
planning and control policies to go through cluttered and dynamic
environments. Advanced autonomous navigation systems have been explored to
improve planners’ and controllers’ robustness, reliability, and computational
efficiency in real-world applications. In the last decade, learning methods
have seen a tremendous success among robotics researchers, motivating an
increasing collection of innovative works which adopt Deep Reinforcement
Learning (DRL) for general autonomous navigation [1], socially aware path
planning [2], and agile aerial vehicles autopilot [3]. Besides the most common
paradigm of sensorimotor agents or local planners, learning agents can be
successfully mixed up in alternative ways with the navigation system. Recent
works proposed hybrid solutions to optimize classic planners like the Dynamic
Window Approach (DWA) [4]. Moreover, [5, 6] recently showed the effectiveness
of the planner’s parameters learning approach compared to end-to-end policy
learning, resulting in an adaptive optimized planner. Despite the impressive
research output, many works never reach real robotic applications, and a great
amount of them present hard reproducibility limitations. These problems are
often tight to the lack of a common tool for robotics to easily develop and
compare solutions in the same conditions. Robot Operating System (ROS),
recently updated to ROS2 [7], is the standard software exoskeleton for any
robotics project. Learning in simulation is certainly the most convenient and
safe procedure to train DRL agents for robotics, and
Gazebo111https://gazebosim.org/home is the common choice among simulators. For
this reason, we propose the PIC4rl-gym222Full code accesible at
https://github.com/PIC4SeR/PIC4rl_gym, an open-source framework in ROS2/Gazebo
realized to enhance, simplify and uniform the research on learning-based
autonomous navigation, bridging the gap between DRL research and mobile
robotics applications. The modular structure of our new gym allows the user to
easily adjust the simulation training settings, selecting the desired robotic
platform, sensors, neural network architecture, and DRL policy. The importance
of this flexibility resides in the fact that autonomous navigation may present
infinite different contexts compared to game-like benchmarks where RL
algorithms are usually proposed. Moreover, a testing package is also embedded
in the gym to encourage the comparison of resulting policies and their
transition to real-world applications. It allows to automatically load trained
agents and compute navigation metrics for each task of interest in different
testing scenarios. We demonstrate the wide potential of the PIC4rl-gym by
presenting diverse ablation studies that can be conducted within the
framework. These include training and testing navigation policies from scratch
and reference to already published works built upon the gym. The resulting
benchmarks are reported for each of the considered navigation categories. We
want to point out that the PIC4rl-gym does not focus on a specific DRL
methodology. It paves the way for developing novel, generic DRL-based
navigation solutions, from end-to-end to hybrid approaches.

Therefore, the contributions of this work are:

  * •

a modular ROS2/Gazebo framework to develop learning-based navigation solutions
for mobile robotic platforms;

  * •

a starting collection of training and testing environments, sensors, and
neural networks models;

  * •

a testing package for trained agents to easily build common benchmarks for
each navigation task considered with an established and expandable set of
metrics.

##  2 Related Works

Previous works exist with similar scopes and objectives. Multiple versions of
a simulation gym for DRL specifically applied to manipulator controls are
proposed by [8, 9]. [10] is a recent similar work that proposes a gym in ROS,
handled with behaviour trees. Regarding this work, we are proposing several
advantages with PIC4rl-gym: first, ROS2 presents several benefits and updates
and is the actual standard for robotics developers. Second, our parameter-
based approach can be better understood by new users for customization, while
different behaviour trees may result difficult to be modified. Differently,
[11] adheres to our idea of a common benchmark for advanced autonomous
navigation, proposing interesting metrics to evaluate a difficulty score for
each generated environment in Gazebo. Despite the rich collection of Gazebo
worlds proposed, this work proposes a dataset of challenging, although not
realistic, scenarios. The training framework used to train the adaptive
planner with reinforcement and parameter learning approach in [12] has not
been released. Moreover, it was based on the previous ROS navigation stack and
a single platform.

Nonetheless, disparate research works have already been developed within the
PIC4rl-gym framework: end-to-end local planners [13], position-agnostic
vineyard navigation [14], and RL-DWA person following [15].

Figure 1: Schematic of ROS nodes and processes composing the PIC4rl gym
framework.

##  3 Approach

In this section, we describe the structure of the PIC4rl-gym and briefly
formalize the theoretical framework of Reinforcement Learning for autonomous
navigation. The ROS2 nodes architecture to perform parametric training
sessions in Gazebo is discussed. Then, the organization of the testing package
included in the gym is also presented, introducing the metrics used to
evaluate the different robot navigation tasks considered so far.

###  3.1 Deep Reinforcement Learning formulation for navigation

A typical Reinforcement Learning (RL) framework can be formulated as a Markov
Decision Process (MDP) described by the tuple
$(\mathcal{S},\mathcal{A},\mathcal{P},R,\gamma)$. An agent starts its
interaction with the environment in an initial state $s_{0}$, drawn from a
pre-fixed distribution $p(s_{0})$ and then cyclically selects an action
$\mathbf{a_{t}}\in\mathcal{A}$ from a generic state
$\mathbf{s_{t}}\in\mathcal{S}$ to move into a new state $\mathbf{s_{t+1}}$
with the transition probability
$\mathcal{P(\mathbf{s_{t+1}}|\mathbf{s_{t}},\mathbf{a_{t}})}$, receiving a
reward $r_{t}=R(\mathbf{s_{t}},\mathbf{a_{t}})$.

In reinforcement learning, a parametric policy $\pi_{\theta}$ describes the
agent behavior. In the context of autonomous navigation, we usually model the
MDP with an episodic structure with maximum time steps $T$. Hence, the agent’s
policy is trained to maximize the cumulative expected reward
$\mathbb{E}_{\tau\sim\pi}\sum_{t=0}^{T}\gamma^{t}r_{t}$ over each episode,
where $\gamma\in[0,1)$ is the discount factor. More in detail, we aim at
obtaining the optimal policy $\pi^{*}_{\theta}$ with parameters
$\mathbf{\theta}$ through the maximization of the discounted term:

$\pi^{*}_{\theta}=\operatorname*{arg\,max}_{\pi}\mathbb{E}_{\tau\sim\pi}\displaystyle\sum_{t=0}^{T}\gamma^{t}r_{t}$
(1)

which can present alternative expressions according to the specific
deterministic or stochastic policy adopted. As mentioned in Section 1, the
agent’s policy can play a wide variety of roles within a navigation framework,
depending on the task and the methodological approach.

###  3.2 PIC4rl-gym training framework

The PIC4rl-gym is designed to provide robotics developers with an easy tool to
start custom DRL training sessions in simulation with minimum action on the
code. The gym focuses on autonomous navigation tasks, which can be approached
with novel solutions based on learning agents or hybrid classic and learning-
based navigation components. To this end, we design an extremely modular
framework, leveraging ROS parameters for fast simulation tuning. Indeed, two
sets of parameters are used to manipulate both the simulation settings and the
training details. The overall scheme of the PIC4rl-gym framework is shown in
Figure 1, depicting the organization of ROS nodes and other elements composing
the complete system. Arrows indicate how they communicate with the Gazebo
simulation environment and the policy Trainer class.

PIC4rl training and environment

The core section of the gym consists of two elements: a training interface
pic4rl_training which bridges the ROS system with the Trainer, and the
environment pic4rl_environment. The overall system has been optimized such
that training and environment modules are condensed in a single ROS2 node
execution, avoiding delays derived from massive data exchange between
different nodes. Hence, a class inheritance-based structure is chosen:
training(env(Node)). The environment reflects the typical design of a DRL gym,
presenting two main methods to be called by the Trainer loop: step() to get
observation and reward data, and reset() to restart a new episode, as shown in
the schematic in Figure 1. Each of the fundamental sub-methods in step()
defines the specific navigation task. Indeed, different navigation tasks can
be tackled by defining a clean environment with appropriate methods to send
the predicted action, calling the correct sensor data to process, defining the
end-of-episode state condition, and designing the agent’s reward function and
observation. The associated pic4rl_training will therefore instantiate the
environment and the desired training policy, starting the Trainer loop. ROS2
parameters allow the user to easily customize the training in simulation as
requested by the navigation task. For example, it is possible to set episode
duration and the number of initial episodes, regulate the exploration, and
change the robot’s starting pose. This ensemble of practical settings strongly
affects the success of the DRL training, being autonomous navigation a much
more complex task to learn compared to standard RL benchmarks. Changing the
robot pose along the simulation is a fundamental feature for the
generalization properties of the agent. In such a way, it is possible to
augment the variety of states experienced by the agents without drastically
increasing the computational cost of the simulation training.

Figure 2: Schematic description of the testing package.

Gazebo simulation

It is possible to launch a simulation in Gazebo, choosing the desired world,
robotic platform, sensor data, and velocity limits in the main parameters
file. In the actual version of the gym, we include standards packages to spawn
differential drive platforms such as
Jackal333https://clearpathrobotics.com/jackal-small-unmanned-ground-vehicle/
and Husky444https://clearpathrobotics.com/husky-unmanned-ground-vehicle-robot/
UGV from ClearPath Robotics or TurtleBot555https://www.turtlebot.com/,
together with omnidirectional custom platforms [16]. The structure of the
simulation package, which handles the Gazebo virtual environment, grants to
easily add new platforms and sensor plugins. Moreover, the gym automatically
manages a precise detection of collisions with obstacles by specifying the
shape and desired tolerance for collisions in the parameters. Whenever a
reset() is performed to start a new episode, the environment calls the
reset_world service of Gazebo to reset the simulation to the original state.
Then, the gazebo-ros set_entity_state service is called to re-spawn the robot
and the visual model of the goal in a new starting pose. When requested by the
task, pause/unpause services can be used at each training step to stop the
simulation while computing a new action and guarantee the MDP property of the
agent-environment interaction loop.

Sensors

A particular focus is devoted to developing a modular framework for sensors.
No available tools offer the possibility to choose or combine data deriving
from different sensors for navigation policies with DRL. In PIC4rl-gym, it is
possible to specify the desired sensors and the associated properties in the
parameters: the number of range points and max distance for 2D LiDAR,
resolution and max depth for RGB-D images. The Sensors() class will take care
of subscribing to the desired topics and process sensor data at each
environment step call. Nonetheless, according to the sensor data shape, a set
of suitable neural network architectures is already available to be selected
in the pic4rl-training node. Simple dense networks are used for 2D LiDAR,
while Convolutional neural networks with multiple inputs are implemented to
organically deal with feature extraction from images (single-channel or
3-channels) and task-dependent state information such as goal location or
robot pose.

Trainer

The gym’s DRL training section is developed by customizing and integrating the
TF2RL library 666https://github.com/keiohta/tf2rl in a ROS2 system. The
Trainer() class takes care of interacting with the ROS environment at each
step and training the RL policy. Real-world autonomous navigation usually
requires agents with continuous action space. According to this, the Trainer
focuses on state-of-the-art policy training algorithms which respect this
condition. Among them, we have Deep Deterministic Policy Gradients (DDPG)
[17], Twin Delayed DDPG (TD3) [18], and Soft Actor-Critic (SAC) [19]. The
TF2RL library also includes diverse replay buffer options, from basic to
prioritized and N-step experience replay. The original implementation of the
Trainer has been adapted to our gym case integrating it into the modular
framework where different network architectures can be selected according to
state shape and task and automatically tune the action output shape.
Nonetheless, the library only provided an initial warm-up phase for experience
collection with a random policy. An $\epsilon$-greedy exploration policy with
exponential decay $\gamma_{\epsilon}$ has also been included to guarantee a
continuous exploration rate during the entire training.

###  3.3 Testing package

A testing package has also been developed to easily evaluate trained agents
and compute navigation metrics in different testing scenarios. The structure
of the Tester() reflects the one used for training, only performing policy
evaluation. Necessary data are collected from the simulation thanks to ros
topics and the Gazebo service get_entity_state, which allows the robot to
store the full traveled path, which can be used to compute metrics for
trajectory comparison. The scheme of the PIC4rl-gym testing package is shown
in Figure 2. New metrics can be easily added to the testing framework and
selected from the parameters configuration interface.

##  4 Experiments and Benchmarks

In this section, some representative experimental sessions are described to
demonstrate the effectiveness of the PIC4rl-gym on a wide variety of potential
applications. Nonetheless, this work aims to introduce the framework without
focusing on a specific approach. We report three different case studies, a
representative one conducted from scratch, the others referring to already
published works realized with the gym.

Figure 3: Example of indoor environment in Gazebo where navigation policies
can be trained or tested, accessing different areas with realistic obstacles
and narrow passages. A Jackal UGV has been spawned to reach the goal (red
circular target).

###  4.1 End-to-end policy comparison

The classic point-to-point navigation is tackled here with a basic end-to-end
policy learning approach, training sensorimotor agents that directly map
different sensor data to robot velocity commands [$v,\omega$] for mapless
navigation. We conducted an ablation study by training and testing four
different policies, changing sensors observation and DRL algorithms. A TD3 and
a SAC dense agents are trained with 2D LiDAR ranges as observations, and a TD3
and a SAC convolutional agents are trained with depth images as input. Figure
3 shows the indoor world used to train the agents. In this case, a Jackal UGV
is used. Alternative ablation studies can be conducted by varying the velocity
ranges, the platform, the reward function, and all the training settings.
Figure 4 shows the reward signal trends obtained during the training. The
agents receive a reward $r_{g}=1000$ if the goal is reached, $r_{c}=-150$ for
collisions, and a dense reward proportional to distance reduction from goal
$r_{d}=(d_{t-1}-d_{t})$. The first 300 episodes are conducted in the central
area of the world with random goals. All the agents are perfectly able to
learn this behaviour, as confirmed by the growing reward trend. Then, the
robot is positioned among realistic obstacles, and the agents should adapt to
this complex condition.

The metrics used to evaluate the point-to-point navigation are:

  * •

number of successes;

  * •

clearance time, cumulative heading average, total path distance, distance/path
ratio;

  * •

mean and standard deviation of linear and angular velocities, max and mean
linear/yaw acceleration;

  * •

min and mean distance from obstacles;

Table 1 reports the main results obtained from the testing stage of the study,
averaging metrics over five different testing episodes with five different
start-goal couples assigned around the indoor world.

Figure 4: End-to-end policy comparison: reward signals obtained during
training the agents. Average reward trend in bold. Table 1: End-to-end policy
comparison: average navigation metrics obtained testing the agents on 5
different episodes.

| success | time | cum. heading | path | dist/path | $v_{mean}$ | $\omega_{std.dev.}$ | max linear | max yaw | min obstacle | mean obstacle
---|---|---|---|---|---|---|---|---|---|---|---
| [n/total] | [s] | [rad] | [m] | [m/m] | [m/s] | [rad/s] | acceleration[m/$s^{2}$] | acceleration[rad/$s^{2}$] | distance [m] | distance [m]
TD3 LiDAR | 5/5 | 24.11 | 0.10 | 5.84 | 0.96 | 0.28 | 0.54 | 3.41 | 18.73 | 0.37 | 3.08
TD3 Depth | 5/5 | 19.29 | 0.11 | 5.77 | 0.94 | 0.31 | 0.43 | 2.60 | 17.23 | 0.53 | 3.65
SAC LiDAR | 5/5 | 29.36 | 0.28 | 6.06 | 0.94 | 0.25 | 0.44 | 2.98 | 16.98 | 0.31 | 2.66
SAC Depth | 5/5 | 16.65 | 0.13 | 5.74 | 0.98 | 0.36 | 0.41 | 2.51 | 16.58 | 0.42 | 2.78

###  4.2 Row-based crops navigation

A position-agnostic navigation agent for vineyards row-based crops has been
trained in the PIC4rl-gym and already presented in detail in the paper [14].
In this case, a SAC convolutional agent learns how to safely guide a robot
through vineyard rows without localization data. Besides velocity comparison,
the robot’s trajectory is evaluated in terms of difference from the center of
the row. Different Gazebo vineyard worlds are available in the gym for
testing. Row-based crops navigation is a fundamental and novel benchmark in
the precision agriculture domain that the PIC4rl-gym can significantly boost
and uniform.

###  4.3 Person monitoring

The PIC4rl-gym has also been used to develop an RL-DWA peculiar person
monitoring algorithm presented in [15]. In this alternative assistive
navigation task, a DRL agent is trained to keep the orientation of an
omnidirectional robot towards the person to be monitored, while the robot is
moving avoiding obstacles.

##  5 Conclusion and Future Works

In this paper, we presented PIC4rl-gym, a novel modular framework in
ROS2/Gazebo to train and test Deep Reinforcement Learning agents specifically
for mobile robot navigation tasks. The highly modular and adaptable structure
of PIC4rl-gym provides robotics researchers with a complete and fast tool for
developing cutting-edge DRL-based navigation solutions for various tasks. Our
experiments highlight the large set of possible configurations one can explore
by combining different platforms, sensors, policies, and neural network
models, leading to performance optimization and flexibility. Nonetheless, we
also release a testing package and a standard set of testing environments to
enhance the practice of comparing proposed solutions on a common research
benchmark.

  * •

Increase the variety of training and testing scenarios

  * •

Expand available sensors (stereo depth camera and Ultrawide-band anchors)

  * •

Include other navigation tasks and benchmarks like exploration and social
navigation.

## References

  * [1] Kai Zhu and Tao Zhang.  Deep reinforcement learning based mobile robot navigation: A review.  Tsinghua Science and Technology, 26(5):674–691, 2021.
  * [2] Yu Fan Chen, Michael Everett, Miao Liu, and Jonathan P How.  Socially aware motion planning with deep reinforcement learning.  In 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1343–1350. IEEE, 2017.
  * [3] Yunlong Song, Mats Steinweg, Elia Kaufmann, and Davide Scaramuzza.  Autonomous drone racing with deep reinforcement learning.  In 2021 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1205–1212. IEEE, 2021.
  * [4] Utsav Patel, Nithish K Sanjeev Kumar, Adarsh Jagan Sathyamoorthy, and Dinesh Manocha.  Dwa-rl: Dynamically feasible deep reinforcement learning policy for robot navigation among mobile obstacles.  In 2021 IEEE International Conference on Robotics and Automation (ICRA), pages 6057–6063. IEEE, 2021.
  * [5] Zifan Xu, Xuesu Xiao, Garrett Warnell, Anirudh Nair, and Peter Stone.  Machine learning methods for local motion planning: A study of end-to-end vs. parameter learning.  In 2021 IEEE International Symposium on Safety, Security, and Rescue Robotics (SSRR), pages 217–222, 2021.
  * [6] Xuesu Xiao, Zizhao Wang, Zifan Xu, Bo Liu, Garrett Warnell, Gauraang Dhamankar, Anirudh Nair, and Peter Stone.  Appl: Adaptive planner parameter learning.  Robotics and Autonomous Systems, 154:104132, 2022.
  * [7] Steven Macenski, Tully Foote, Brian Gerkey, Chris Lalancette, and William Woodall.  Robot operating system 2: Design, architecture, and uses in the wild.  Science Robotics, 7(66):eabm6074, 2022.
  * [8] Nestor Gonzalez Lopez, Yue Leire Erro Nuin, Elias Barba Moral, Lander Usategui San Juan, Alejandro Solano Rueda, Víctor Mayoral Vilches, and Risto Kojcev.  gym-gazebo2, a toolkit for reinforcement learning using ros 2 and gazebo.  arXiv preprint arXiv:1903.06278, 2019.
  * [9] Yue Leire Erro Nuin, Nestor Gonzalez Lopez, Elias Barba Moral, Lander Usategui San Juan, Alejandro Solano Rueda, Víctor Mayoral Vilches, and Risto Kojcev.  Ros2learn: a reinforcement learning framework for ros 2.  arXiv preprint arXiv:1903.06282, 2019.
  * [10] Woong Gyu La, Lingjie Kong, Sunil Muralidhara, and Pratik Nichat.  Deepsim: A reinforcement learning environment build toolkit for ros and gazebo.  arXiv preprint arXiv:2205.08034, 2022.
  * [11] Daniel Perille, Abigail Truong, Xuesu Xiao, and Peter Stone.  Benchmarking metric ground navigation.  In 2020 IEEE International Symposium on Safety, Security, and Rescue Robotics (SSRR), pages 116–121. IEEE, 2020.
  * [12] Zifan Xu, Gauraang Dhamankar, Anirudh Nair, Xuesu Xiao, Garrett Warnell, Bo Liu, Zizhao Wang, and Peter Stone.  Applr: Adaptive planner parameter learning from reinforcement.  In 2021 IEEE international conference on robotics and automation (ICRA), pages 6086–6092. IEEE, 2021.
  * [13] Local Planners with Deep Reinforcement Learning for Indoor Autonomous Navigation. Zenodo, October 2021.
  * [14] Mauro Martini, Simone Cerrato, Francesco Salvetti, Simone Angarano, and Marcello Chiaberge.  Position-agnostic autonomous navigation in vineyards with deep reinforcement learning.  In 2022 IEEE 18th International Conference on Automation Science and Engineering (CASE), pages 477–484. IEEE, 2022.
  * [15] Andrea Eirale, Mauro Martini, and Marcello Chiaberge.  Rl-dwa omnidirectional motion planning for person following in domestic assistance and monitoring.
  * [16] Andrea Eirale, Mauro Martini, Luigi Tagliavini, Dario Gandini, Marcello Chiaberge, and Giuseppe Quaglia.  Marvin: An innovative omni-directional robotic assistant for domestic environments.  Sensors, 22(14):5261, 2022.
  * [17] Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra.  Continuous control with deep reinforcement learning.  arXiv preprint arXiv:1509.02971, 2015.
  * [18] Scott Fujimoto, Herke Hoof, and David Meger.  Addressing function approximation error in actor-critic methods.  In International conference on machine learning, pages 1587–1596. PMLR, 2018.
  * [19] Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine.  Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor.  In International conference on machine learning, pages 1861–1870. PMLR, 2018.


# Theory of Thomson scattering in inhomogeneous media

P. M. Kozlowski<EMAIL_ADDRESS>Department of Physics,
University of Oxford, Parks Road, Oxford, OX1 3PU, United Kingdom  B. J. B.
Crowley  Department of Physics, University of Oxford, Parks Road, Oxford, OX1
3PU, United Kingdom  AWE plc, Reading RG7 4PR, United Kingdom  D. O. Gericke
Centre for Fusion, Space and Astrophysics, Department of Physics, University
of Warwick, Coventry CV4 7AL, United Kingdom
S. P. Regan  Laboratory for Laser Energetics, University of Rochester, 250
East River Road, Rochester, NY 14623, United States
G. Gregori  Department of Physics, University of Oxford, Parks Road, Oxford,
OX1 3PU, United Kingdom

###### Abstract

Thomson scattering of laser light is one of the most fundamental diagnostics
of plasma density, temperature and magnetic fields. It relies on the
assumption that the properties in the probed volume are homogeneous and
constant during the probing time. On the other hand, laboratory plasmas are
seldom uniform and homogeneous on the temporal and spatial dimensions over
which data is collected. This is particularly true for laser-produced high-
energy-density matter, which often exhibits steep gradients in temperature,
density and pressure, on a scale determined by the laser focus. Here, we
discuss the modification of the cross section for Thomson scattering in fully-
ionized media exhibiting steep spatial inhomogeneities and/or fast temporal
fluctuations. We show that the predicted Thomson scattering spectra are
greatly altered compared to the uniform case, and may even lead to violations
of detailed balance. Therefore, careful interpretation of the spectra is
necessary for spatially or temporally inhomogeneous systems.

††preprint: Submitted to Scientific Reports

Fourth generation light sources hold the promise of improving our
understanding of extreme states of matter by providing a probe which can
penetrate through the enormous densities produced in inertial confinement
fusion or laboratory astrophysics experiments. Thomson scattering by free
electrons has emerged as a powerful diagnostic for such systems, through its
extension from the optical through the x-ray regime, allowing it to take full
advantage of the new capabilities provided by fourth generation light sources
(e.g. LCLS, SACLA, European XFEL, SwissFEL) sheffield ; pile ; emma1 . Thomson
scattering allows for the measurement of density, temperature, and ionization
state in plasmas, leading to an effective characterization of the plasma
equilibrium state evans ; glenzer1 ; sheffield , and progress in the
understanding of the properties of high-energy-density matter has
significantly relied upon this technique gregori1 ; glenzer2 ; glenzer3 ; saiz
; kritcher ; brown ; chapman15 . Thomson scattering has also been utilized for
probing temperatures and magnetic fields in tokamaks peacock1969 ; carolan1978
.

Investigations using Thomson scattering to date have been based on the
assumption of a homogenous or weakly inhomogeneous plasma. This limitation
becomes particularly restrictive when considering the ultra-short x-ray pulses
and near diffraction limited laser spot sizes of fourth generation light
sources nagler ; emma1 . Under such conditions, large spatial and temporal
gradients in the properties of matter are not negligible and are mainly
determined by the extent of laser focus drake . This situation is exemplified
by inertial fusion experiments, where the capsule is compressed by a series of
shocks glenzer1 ; hurricane , which introduce inhomogeneities on the scale of
the particle mean free path (i.e., the shock width) and this significantly
complicates the determination of the properties of the dense, compressed core
in a scattering experiment regan . Interpreting the scattering signals with
models developed for homogenous equilibrium systems may thus lead to
significant errors in the inferred properties of the matter.

Here we develop a generalization of the theory for Thomson scattering to
spatially inhomogeneous systems, with a scale-length of the gradient
comparable to the scattering wavelength, as well as to rapidly varying plasma
conditions. In order to capture the fast externally driven relaxation
processes in a sample, ultra-short pulses with durations on the order of the
inverse of the plasma frequency are needed. We demonstrate that, under these
conditions, both strong density and temporal gradients result in significant
changes in the predicted spectra, modifying the intensity and width of the
inelastic scattering peaks due to collective electron excitations (plasmons).
As Thomson scattering diagnostics yield results by matching theoretical
predictions with experimental data, these modifications have important
consequences when interpreting experimental data.

###  Limitations of theories for homogeneous systems

We consider a scattering probe of wavelength $\lambda_{0}$. The wavenumber of
the transferred momentum is determined by the scattering geometry as
$k\equiv|{\bf k}|\approx(4\pi/\lambda_{0})\sin(\theta/2)$, where $\theta$ is
the scattering angle. The spatial scale-length sampled by the scattering probe
is thus $\lambda_{p}\sim 1/k$. The scale length of microscopic density
fluctuations in equilibrium plasmas is determined by the screening length
$\lambda_{scr}$ of electric fields evans ; sheffield . This length is usually
taken to be the Debye length in a classical plasma or the Thomas-Fermi
screening length in a degenerate electron gas. Whether the single particle
behaviour or collective excitations are probed (noncollective versus
collective scattering) depends on the ratio of these scale length. Thus, the
scattering condition is usually cast by the parameter
$\alpha=\lambda_{p}/\lambda_{scr}$.

Noncollective scattering corresponds to $\alpha\ll 1$. In this case, the total
scattering signal is the incoherent sum of individual scatterers. Even in an
inhomogeneous system, different regions in the plasma will scatter an amount
of photons proportional to the local conditions, and the resultant spectrum is
expected to be the sum of these local contributions. In the opposite case of
collective scattering with $\alpha>1$, the picture is qualitatively different:
now the spatial arrangements of free charges within a distance $\lambda_{p}$
give rise to a coherent superposition of scattering waves. Since plasmas
support electrostatic waves (plasmons), the scattered photons gain or lose an
amount of energy close to $\hbar\omega_{pe}$, where $\omega_{pe}$ is the
plasma frequency glenzer1 . Plasmon resonances appear in the scattering
spectrum as a result of these wave-particle interactions.

Thomson scattering probes the fluctuations of a system. In equilibrium
systems, these can be either microscopic density perturbations due to bound
electrons or screening clouds, or collective excitations such as plasmons.
Likewise, hydrodynamic gradients in the plasma conditions may also result in
light scattering if they occur on the scale of the probe volume. Moreover, the
dispersion of the plasma waves may be affected by gradients. If the scale
length of macroscopic spatial inhomogeneities, $\Lambda$, is much larger than
the length scale probed, that is $\lambda_{p}$, we can still apply the
equilibrium theory locally, i.e., on scales $\sim$$\lambda_{p}$. Hence, the
resultant spectrum is simply the sum of the weighted contributions of
different regions in the plasma. For strong gradients with
$\Lambda\lesssim\lambda_{p}$, the plasmon dispersion is changed and, thus, the
coherence relation between scatterers is altered. Consequently, macroscopic
spatial gradients must be considered in the theoretical description explicitly
(see also Ref. gregori_pre1999  for further considerations). Similar
difficulties arise if the duration of the scattering probe, $\tau$, is shorter
than the time required for screening to be established and the system is
dynamically evolving in states far from equilibrium. The typical time scale
for such processes is on the order of $2\pi/\omega_{pe}$.

## Results

###  Theory for inhomogeneous systems

The differential cross section of Thomson scattering is determined by the
dynamic structure factor $S({\bf k},\omega)$, where $\hbar{\bf k}$ is the
change in photon momentum and $\hbar\omega$ is the energy gain (or loss) of
the photon during scattering glenzer1 . In an isotropic medium all directions
are equivalent and the dependence on the modulus of the wavenumber is
sufficient, that is $S(k,\omega)$. The structure factor is the Fourier
transform of the electron density-density correlation function ichimaru ;
crowley , and essentially an extension of the well-known form factor used in
x-ray crystallography kittel . Thus, it contains all electron correlations and
their dynamics including collective excitations in the system. A number of
different sources may contribute to the total dynamic structure factor and
thus to the Thomson scattering signal. The total dynamic structure factor is
usually written as chihara :

$S\left(k,\omega\right)=\left|f_{I}(k)+q(k)\right|^{2}S_{ii}\left(k,\omega\right)+Z_{f}S_{ee}^{0}(k,\omega)+Z_{c}\int\tilde{S}_{ce}\left(k,\omega-\omega^{\prime}\right)S_{s}(k,\omega^{\prime})d\omega^{\prime}\,.$
(1)

The first term deals with electrons which follow the motion of the ions. These
motions are described by the ion-ion density correlation function
$S_{ii}(k,\omega)$, with $f_{I}(k)$ the scattering form factor of the bound
electrons in the ion and $q(k)$ the contribution arising from the screening
cloud around an ion. The second term in Eq. (1) represents free electrons,
those which do not follow the ion motions. The last term consists of inelastic
scattering by core electrons, where $\tilde{S}_{ce}\left(k,\omega\right)$ is
the structure factor of the core electrons inside an ion and $S_{s}(k,\omega)$
the self structure of the ions, which describes their thermal motion. Here,
$Z_{f}$ and $Z_{c}$ are the number of free electrons and core electrons per
ion, respectively.

In principle, gradients correction will affect all three terms in Eq. (1).
However, we expect the largest modifications to occur for the free electron
feature, i.e., $S_{ee}^{0}(k,\omega)$. The other terms are strongly related to
the microscopic bound states that will be unchanged by the gradients in the
plasma environment. The screening clouds will also be modified only slightly
due to hydrodynamic gradients. Thus, we focus here on the effect of collective
electron excitations and their dispersion due to gradients in the plasma.

Spatial gradients and fast relaxation processes, including the build-up of
correlations and screening, can be described on the basis of the Kadanoff-Baym
equations KB_book . Although numerical solutions are feasible KB_00 , they are
restricted for easy situations and simple approximations for the interactions.
However, a more practical way is possible for weakly coupled plasmas of
interest. Taking $S(k,\omega)\equiv S_{ee}^{0}(k,\omega)$, the approximate
dynamic structure factor of free electrons in a weakly coupled plasmas is
given by the dielectric superposition principle ichimaru

$S({\bf k},\omega)=\frac{S^{\rm id}{({\bf k},\omega)}}{|\epsilon\left({\bf
k},\omega\right)|^{2}}\,,$ (2)

where $S^{\rm id}{({\bf k},\omega)}$ is the dynamic structure factor for an
ideal (noninteracting) gas, and $\epsilon({\bf k},\omega)$ is the dielectric
(screening) function in the random phase approximation (RPA). The latter is
given by $\epsilon\left({\bf k},\omega\right)=1+\chi^{0}\left({\bf
k},\omega\right)$, where $\chi^{0}\left({\bf k},\omega\right)$ is the
susceptibility of the ideal Coulomb plasma. Eq. (2) is an approximation in
first order with respect to the correlation strength in the plasma. Although
strong coupling effects may need to be taken into account under certain
conditions, in most situations concerning laboratory experiments the electrons
are nearly or fully degenerate and therefore weakly coupled. The applicability
of RPA to first order is often justified for relatively uniform systems, and
higher order corrections to the RPA are typically small. Static and dynamic
local field corrections act to slightly modify the dispersion relation (i.e.,
the position of the plasma wave resonance peaks of the structure factor) and
can in principle be accounted for within the same theoretical scheme discussed
in this paper. Eq. (2) also returns to the familiar fluctuation-dissipation
theorem (FDT) for systems in local thermodynamic equilibrium (LTE) ichimaru .
For systems which are not in LTE different approaches may be considered for
the structure factors gregori_pre2006 ; gregori_hedp2007 ; however, in the
context of random phase approximation, the dielectric superposition principle
is exact and we may proceed with a description of the dielectric function for
systems considerably departing from homogeneity and equilibrium.

The direct application of Eq. (2) is crucial for systems with spatial and
temporal gradients as the usual application of the FDT limits the theory to
the LTE regime. To extend the applicability of the theory to inhomogeneous
plasmas, we follow the approach given by Belyi belyi  and Bornatici and
Kravtsov bornatici . Assuming the susceptibility to be a smooth function of
macroscopic space ($\bf r$) and time (t) coordinates, one may apply a first
order gradient expansion in the microscopic variables

$\chi\left({\bf k},\omega\right)\approx\chi^{\rm eq}\left({\bf
k},\omega\right)-i\dfrac{\partial}{\partial\bf{k}}\cdot\dfrac{\partial}{\partial\bf{r}}\chi^{\rm
eq}\left({\bf
k},\omega\right)+i\dfrac{\partial}{\partial\omega}\dfrac{\partial}{\partial
t}\chi^{\rm eq}\left({\bf k},\omega\right)\,.$ (3)

Here, the index ‘eq’ labels the susceptibility for homogeneous systems in
thermodynamic equilibrium.

Introducing a scale for the gradients in space and time, the above form can
further be simplified: $\partial/\partial{\bf r}\approx 1/{\Lambda}$ and
$\partial/\partial t\approx 1/{\tau}$. Here, $\Lambda$ represents the spatial
gradient along the direction of the scattering wavenumber $\bf k$ where the
sign indicates increasing or decreasing plasma parameters. Unless the spatial
gradients are distributed uniformly along all directions, as for example in
isotropic turbulence, the scattering spectrum will depend on the specific
geometry. Similarly, the time constant $\tau$ gives either the strength of
externally driven changes (e.g., heating) or the relaxation time within the
electron system.

The dielectric response of the system can then be constructed in the usual way

$\epsilon({\bf k},\omega)\approx 1+\chi^{\rm eq}\left({\bf
k},\omega\right)-i\dfrac{1}{\Lambda}\dfrac{\partial}{\partial k}\chi^{\rm
eq}\left({\bf
k},\omega\right)+i\dfrac{1}{\tau}\dfrac{\partial}{\partial\omega}\chi^{\rm
eq}\left({\bf k},\omega\right)\,.$ (4)

For noncollective scattering, $\chi\left({\bf k},\omega\right)\ll 1$,
gradients have no significant effect on the dielectric response. On the other
hand, in collective scattering the susceptibility cannot be neglected, and
$\epsilon({\bf k},\omega)\sim\epsilon^{\rm eq}({\bf k},\omega)$ follows only
if $k\Lambda\sim\Lambda/\lambda_{p}\gg 1$ and $\omega\tau\sim\tau/\tau_{p}\gg
1$, as discussed before.

The above expansion can be understood from the constitutive relation between
the displacement, $\bf D$, and the electric $\bf E$, fields in a macroscopic
medium bornatici :

$D_{i}({\bf r},t)=\int
d^{3}r^{\prime}\int\limits_{-\infty}^{t}dt^{\prime}\epsilon_{ij}({\bf
r},t;{\bf r}^{\prime},t^{\prime})E_{j}({\bf r}^{\prime},t^{\prime}),$ (5)

where $\bf r$ and $t$ are the space and time coordinates, respectively. This
implies that the dielectric tensor is not a function only of ${\bf r}-{\bf
r}^{\prime}$ and $t-t^{\prime}$, as we would have in a uniform and stationary
medium, but instead it is a function of the space and time variables $({\bf
r},t)$ and $({\bf r}^{\prime},t^{\prime})$ independently. Through a change of
variables the dielectric function may be expressed as

$\epsilon_{ij}({\bf r},t;{\bf
r}^{\prime},t^{\prime})\to\epsilon_{ij}\left({\bf r}-{\bf
r}^{\prime},t-t^{\prime};\mu{\bf r}^{\prime},\mu t^{\prime}\right),$ (6)

where the ”fast” variables $\Delta\bf{r}={\bf r}-{\bf r}^{\prime}$ and $\Delta
t=t-t^{\prime}$ are associated with the microscopic spatial ($\bf k$) and
temporal ($\omega$) dispersion in Fourier space. The remaining ”slow”
variables, $\mu{\bf r}$ and $\mu t$, account for the macroscopic
inhomogeneities of the medium. The factor
$\mu\approx\Lambda/\lambda_{p}\,;\,\tau/\tau_{p}$ compares the scales of the
fast and slow variables. When $\mu\gtrsim 1$, the dielectric function is
expanded in Taylor series with respect to $\mu$:

$\epsilon_{ij}({\bf r},t;{\bf
r}^{\prime},t^{\prime})\approx\epsilon_{ij}+\mu\Delta{\bf
r}\cdot\frac{\partial\epsilon_{ij}}{\partial{\mu\bf r}}+\mu\Delta
t\frac{\partial\epsilon_{ij}}{\partial\mu t},$ (7)

and assuming that the electric field is locally of an eikonal form,
$\exp[i\left({\bf k}\cdot\Delta{\bf r}-\omega\Delta t\right)]$, Eq. (4) is
then retrieved belyi ; bornatici . From the given dielectric function, the
free electron dynamic structure factor of inhomogeneous plasmas can be
obtained from Eq. (2). As the ideal part is, of course, unchanged, the
contribution of gradients to the Thomson scattering signal are all contained
in the expression for the dielectric constant Eq. (4). Higher-order terms in
the Taylor expansion are neglected. Accordingly, our theory presents the
first-order correction to the equilibrium treatment and is thus limited to
moderate gradients. Of course, in real experiments this condition may not
apply and higher-order terms should be considered as they may yield details of
the complex relation between the the electric and density fluctuations
implicit in the non-local Poisson equation. In the latter case, our theory
will give at least a clear signal that an equilibrium treatment is not
applicable. It should be noted here that the above result has been derived
upon the assumption of geometric optics, thus this method of addressing
inhomogeneities is applicable not just to the free electron dynamic structure
factor, but any calculation of the dynamic structure factor which utilizes the
dielectric susceptibility. This fact is indeed important if we intend to apply
the same analysis to the other terms in Eq. (1). The main difference in
implementing this formula for terms other than the free electron dynamic
structure factor, will arise from whether or not Eq. (2) is applicable.

###  Application of the theory

In order to evaluate the effects of spatial and temporal density variations in
the scattering spectrum, we consider a practical example of a fully ionized
dense deuterium plasma with an average electron density $n_{e}=2.2\times
10^{23}\>\rm cm^{-3}$ and an electron temperature $T_{e}=8\>\rm eV$ (see,
e.g., Regan et al. regan  for the experimental setup). Under such conditions
the Fermi energy is comparable to the thermal energy and thus we need to take
into account quantum effects by choosing a suitable form for $\chi\left({\bf
k},\omega\right)$. For the present example we use the random phase
approximation gregori1 ; Landau :

$\epsilon\left({\bf
k},\omega\right)=1-\frac{e^{2}}{\hbar\epsilon_{0}k^{2}}\int\frac{f(\bm{p}+\hbar\bm{k}/2)-f(\bm{p}-\hbar\bm{k}/2)}{\bm{k}\cdot\bm{p}/m_{e}-\omega-
iv}\frac{2d^{3}p}{(2\pi\hbar)^{3}}$ (8)

where $f(\bm{p})$ is the electron distribution function.

This plasma is probed with x-rays with an energy of 2,960 eV at a scattering
angle of $\theta=40^{\rm o}$, giving $\alpha=2.17$, i.e., collective
scattering conditions. The characteristic probe scale length is
$\lambda_{p}\approx 0.1$ nm, and the relaxation time is $\tau\approx 0.2$ fs.
This suggests that strong spatial gradients may be observable whereas it will
be improbable to find suitable ultra-fast probes.

In Figure 1a, we have plotted the dynamic structure factor $S({\bf k},\omega)$
giving the form of the expected Thomson scattering signal for different values
for the spatial scale $\Lambda$ (and taking $\tau\to\infty$). We observe large
changes in both the width and relative heights of the blue and red shifted
plasmon resonances when $\Lambda/\lambda_{p}\lesssim 10$. Moreover, the
relative intensity of the two resonances changes depending on the direction of
the gradients with respect to the probe (parallel or anti-parallel). In Figure
1c, we have considered the case of temporal fluctuations comparable to the
probe duration (and with no spatial gradients). Again, the predicted dynamic
structure factor is significantly broadened for $\tau/\tau_{p}\lesssim 2$.
This effect is to be expected, since a shorter pulse duration would have the
same effect as a higher collision frequency between scatterers, which results
in a broadening of the plasmon lines.

As expected, the detailed balance relation is not recovered for nonhomogeneous
and nonequilibrium systems. In a homogeneous plasma, the intensity of the
plasmon resonances is determined by detailed balance ichimaru ; pines .
Detailed balance is a consequence of LTE, which, in this case, is governed by
Fermi statistics where scattering events for which the electron final state
falls into an energy level lower than the ground state (and consequently an
energy gain for the photon) are not allowed. In an inhomogeneous system,
however, currents induced by the gradients provide an additional sink or
source in the energy exchange between electrons and photons. This effect is
also well-known from scattering measurements of ion acoustic waves in
classical plasmas in the presence of a heat flow evans .

The change in the detailed balance relation bears important consequences in
the analysis of Thomson scattering data from solid density plasmas. As
discussed in Refs. glenzer1 ; doppner ; faustlin , the intensity ratio of the
two plasmon peaks is often assumed to provide a direct measurement of the
temperature, without relying on any additional approximations. On the other
hand, as discussed by Chapman and Gericke gericke , once the homogeneous
plasma or equilibrium assumption is relaxed, the intensity ratio of the
plasmon peaks is no longer uniquely defined by the electron temperature. In
such cases, nonequilibrium distributions and spatial gradients determine the
shape and intensity of the plasmon peaks in the scattering signal.

Figure 2 demonstrates how the ratio of the upshifted and downshifted plasmon
signals dramatically diverges from the equilibrium case as density varies for
the same conditions given in the example above. The ratio of plasmon signals
is maximized when $n_{e}\approx 2.8\times 10^{23}\>\rm cm^{-3}$ which occurs
when $\operatorname{Re}[{\chi^{\rm eq}\left({\bf k},\omega\right)}]$ reaches a
minimum for both resonances, $\omega=\pm\omega_{pe}$, while
$\dfrac{\partial}{\partial k}\operatorname{Im}[\chi^{\rm eq}\left({\bf
k},\omega\right)]$ reaches a maximum for the upshifted plasmon and a minimum
for the downshifted plasmon. It is due to this latter term being an odd
function with respect to $\omega$ that the detailed balance condition is
violated. We may conclude that given a sufficiently nonequilibrium plasma
probed in the collective scattering regime, assuming the ratio of the plasmon
peaks to yield a measure of temperature may lead to large errors.

Similarly, in Figure 3 we show how significantly the red and blue shifted
plasmon peak intensities change as a function of the inhomogeneity scale
lengths. The simulations were conducted for the same plasma parameters as
discussed above, while varying either $\Lambda$ or $\tau$. Here we see that
the results of the new approach deviate from equilibrium starting at around
$\Lambda k\sim 100$. It is important to note, that although the figure gives a
sense of how gradients may alter the scatter signal, the change is not the
same for all plasma parameters. This is due to the inhomogeneous dynamic
structure factor depending on differences between the real and imaginary
components of the dielectric susceptibility as described above.

### Comparison with previous approaches

An approximate, but often applied glenzer4 ; rozmus ; falk ; chapman ;
sperling , method to account for the effects of spatial gradients on the
Thomson scattering spectrum is to simply take the average over a given region.
Thus, individual scattering spectra are generated for different plasma regions
using the FDT, weighted by the number of electrons present in the subvolume
selected and finally added to obtain the full spectrum:

$S_{\rm sum}({\bf k},\omega)=\dfrac{\Sigma_{j}V_{j}n_{e,j}S_{j}({\bf
k},\omega)}{\Sigma_{j}V_{j}n_{e,j}},$ (9)

where $V_{j}$, $n_{e,j}$ and $S_{j}({\bf k},\omega)$ are the volume, electron
density and structure factor of cell $j$, respectively. The simplest
approximation consists in taking $S_{j}({\bf k},\omega)\equiv S^{eq}_{j}({\bf
k},\omega)$, where $S^{eq}_{j}({\bf k},\omega)$ is the equilibrium structure
factor inside the $j$th cell. This is the method discussed in Ref. glenzer4 ;
rozmus ; falk , for example. As already mentioned, this incoherent addition of
scattering spectra is strictly valid only if $\alpha\ll 1$ or both
$\Lambda/\lambda_{p}\gg 1$ and $\tau/\tau_{p}\gg 1$. One might assume that
dividing the volume into infinitesimally small cells would make this method
applicable even for steep gradients, however, one neglects the explicit
influence of the gradients in this way. Technically, the problem with the LTE
treatment is that the local dynamic structure factors which are being used
assume that only the imaginary, dissipative component of the dielectric
susceptibility is important, as in Eq. (2), but don’t consider the current
flows. This assumption fails for large gradients where the real component of
the dielectric susceptibility becomes critical. Such an effect is also common
in Onsager-violating media where cross-terms between the energy storing and
dissipative components of the dielectric susceptibility emerge Buhmann . Here,
instead, we propose to replace the calculation of the equilibrium structure
factor inside each subvolume element with its non-equilibrium version.

Let us continue our practical example and test the above approach by assuming
that the plasma exhibits density variations on a scale of $\Lambda=1.45$ nm.
The density gradient is then given by $dn_{e}/dr=n_{e}/\Lambda$. We notice
that such gradients are, for example, quite common in shocked dense matter.
For the conditions of Ref. regan , we expect the electron mean free path to be
$\lambda_{\rm mfp}\sim 0.4$ nm, and thus the shock width to be a few mean free
paths, which is indeed of the same order as assumed here. Figure 4 shows a
comparison between the overall structure factors calculated with the methods
described above. Large modifications to the whole spectrum are seen when the
full effect of inhomogeneities is accounted for in the weighted sum.

## Concluding Remarks

Our work indicates that collective Thomson scattering by free electrons from
strongly inhomogeneous matter requires a modeling of the dielectric response
including not only the effects of microscopic, but also macroscopic spatial
and temporal gradients. The treatment presented here gives results that differ
significantly from those assuming uniform plasma conditions for systems with
gradients as often encountered in experiments, in particular the violation of
detailed balance. Further work must be done to incorporate inhomogeneities for
Thomson scattering by screening clouds and ion acoustic modes, which are
ubiquitous in warm dense matter and tend to be strongly correlated.

### Acknowledgments

This article is a tribute to the late Prof Basil Crowley, who has inspired us
to be rigorous in the pursuit of knowledge. We would like to thank Prof. M.
Schlanges (Greifswald) for illuminating discussions. The research leading to
these results has received funding from the European Research Council under
the European Community’s Seventh Framework Programme (FP7/2007-2013) / ERC
grant agreement no. 256973.

### Author Contributions

G.G. conceived this project. The paper was written by P.M.K, B.J.B.C and
D.O.G. Theoretical guidance was given by B.J.B.C and D.O.G. The relation to
experimental data was provided by S.P.R.

### Competing Interests

The authors declare that they have no competing financial interests.

## References

  * (1) Froula, D., Glenzer, S. H., Luhmann, N. C. and Sheffield, J. in  _Plasma scattering of electromagnetic radiation 2nd edn_ , Ch. 11, 309-334  (Academic Press, 2011).
  * (2) Pile, D. X-rays: First light from SACLA.  _Nat. Photon._ 5, 456-457 (2011).
  * (3) Emma, P. et al. First lasing and operation of an ångstrom-wavelength free-electron laser.  _Nat. Photon._ 4, 641-647 (2010).
  * (4) Glenzer, S. H., and Redmer, R. X-Ray Thomson scattering in high energy density plasmas.  _Rev. Mod. Phys._ 81, 1625-1663 (2009).
  * (5) Evans, D. E., and Katzenstein, J. Laser light scattering in laboratory plasmas.  _Rep. Progr. Phys._ 32, 207-271 (1969).
  * (6) Gregori, G., Glenzer, S. H., Rozmus, W., Lee, R. W., Landen, O. L. Theoretical model of x-ray scattering as a dense matter probe.  _Phys. Rev. E_ 67, 026412 (2003).
  * (7) Glenzer, S. H. et al. Demonstration of Spectrally Resolved X-Ray Scattering in Dense Plasmas.  _Phys. Rev. Lett._ 90, 175002 (2003).
  * (8) Glenzer, S. H. et al. Observations of Plasmons in Warm Dense Matter.  _Phys. Rev. Lett._ 98, 065002 (2007).
  * (9) Garcia Saiz, E. et al. Probing warm dense lithium by inelastic x-ray scattering.  _Nature Phys._ 4, 940-944 (2008).
  * (10) Kritcher, A. L. et al. Ultrafast X-ray Thomson Scattering of Shock-Compressed Matter.  _Science_ 322, 69-71 (2008).
  * (11) Brown, C. R. D. et al. Evidence for a glassy state in strongly driven carbon.  _Sci. Reports_ 4, 5214 (2014).
  * (12) D.A. Chapman, D. A. et al. Observation of Finite-Wavelength Screening in High-Energy-Density Matter.  _Nature Comm._ 6, 6839 (2015).
  * (13) Peacock, N. J., Robinson, D. C., Forrest, M. J., Wilcock, P. D. and Sannikov, V. V. Measurement of the electron temperature by Thomson scattering in tokamak T3.  _Nature_ 224, 488-490 (1969).
  * (14) Forrest, M. J., Carolan, P. G. and Peacok, N. J. Measurement of the magnetic field in a tokamak using laser light scattering.  _Nature_ 271, 718-722 (1978).
  * (15) Nagler, B. et al. Turning solid aluminium transparent by intense soft X-ray photoionization.  _Nature Phys._ 5, 693-696 (2009).
  * (16) Drake, R. P. in  _High energy density physics_ , Ch. 11, 461-464  (Springer, 2006).
  * (17) Hurricane, O. A. et al. Fuel gain exceeding unity in an inertially confined fusion implosion  _Nature_ 506, 343-348 (2014).
  * (18) Regan, S. P. et al. Inelastic X-Ray Scattering from Shocked Liquid Deuterium.  _Phys. Rev. Lett._ 109, 265003 (2012).
  * (19) Gregori, G. et al. Thomson scattering measurements in atmospheric plasma jets.  _Phys. Rev. E._ 59, 2286 (1999).
  * (20) Ichimaru, S. in  _Basic Principles of Plasma Physics_ , Ch. 7 Fluctuations, 251-255  Addison-Wesley (1973).
  * (21) Crowley, B. J. B. and Gregori, G. X-ray scattering by many-particle systems.  _New J. Phys._ 15, 015014 (2013).
  * (22) Kittel, C. in  _Introduction to solid state physics_ 8th edn, Ch. 2, 23-45  (Wiley, 2004).
  * (23) Chihara, J. Difference in X-ray scattering between metallic and non-metallic liquids due to conduction electrons.  _Phys. F:Met. Phys._ 17, 295 (1987).
  * (24) Kadanoff, L.P. and Baym, G.  _Quantum Statistical Mechanics_.  W.A. Benjamin Inc. (1962).
  * (25) Kwong, N.-H. and Bonitz, M. Real-time Kadanoff-Baym approach to plasma oscillations in a correlated electron gas.  _Phys. Rev. Lett._ 84, 1768 (2000).
  * (26) Gregori, G. and Glenzer, S. H. and Landen, O. L. Generalized x-ray scattering cross section from nonequilibrium plasmas.  _Phys. Rev. E._ 74, 026402 (2006).
  * (27) Gregori, G. et al. Derivation of the static structure factor in strongly coupled non-equilibrium plasmas for X-ray scattering studies.  _High Energy Density Physics_ 3, 99-108 (2007).
  * (28) Belyi, V. V. Fluctuation-Dissipation Relations for a Nonlocal Plasma.  _Phys. Rev. Lett._ 88, 255001 (2002).
  * (29) Bornatici, M. and Kravtsov, A. Yu. Comparative analysis of two formulations of geometrical optics. The effective dielectric tensor.  _Plasma Phys. Controlled Fusion_ 42, 255 (2000).
  * (30) Pitaevskii, L. P. and Lifshitz, E. M.  _Physical Kinetics_.  Butterworth-Heinemann (1981).
  * (31) Pines, D. and Nozieres, P. in  _The Theory of Quantum Liquids,_ Ch. 2, 130-136  (Westview Press, 1999).
  * (32) Döppner, T. et al. Temperature measurement through detailed balance in x-ray Thomson scattering.  _High Energy Dens. Phys._ 5, 182-186 (2009).
  * (33) Fäustlin, R. R. et al. Observation of Ultrafast Nonequilibrium Collective Dynamics in Warm Dense Hydrogen.  _Phys. Rev. Lett._ 104, 125002 (2010).
  * (34) Chapman, D. A. and Gericke, D. O. Analysis of Thomson Scattering from Nonequilibrium Plasmas.  _Phys. Rev. Lett._ 107, 165004 (2011).
  * (35) Glenzer, S. H. et al. Thomson Scattering from High-Z Laser-Produced Plasmas.  _Phys. Rev. Lett._ 82, 97-100 (1999).
  * (36) Rozmus, W., Glenzer, S. H., Estabrook, K. G., Baldis, H. A., MacGowan, B. J. Modeling of Thomson Scattering Spectra in High-Z, Laser-produced Plasmas.  _Astrophys. J. Suppl. S._ 127, 459-463 (2000).
  * (37) Falk, K. et al. Comparison between x-ray scattering and velocity-interferometry measurements from shocked liquid deuterium.  _Phys. Rev. E_ 87, 043112 (2013).
  * (38) Chapman, D. A. et al. Simulating x-ray Thomson scattering signals from high-density, millimetre-scale plasmas at the National Ignition Facility  _Phys. Plasmas_ 21, 082709 (2014).
  * (39) Sperling, P., Liseykina, T., Bauer, T., Redmer, R. Time-resolved Thomson scattering on high-intensity laser-produced hot dense helium plasmas  _New J. Phys._ 15, 025041 (2013).
  * (40) Buhmann, S. Y., Butcher, D. T., Scheel, S. Macroscopic quantum electrodynamics in nonlocal and nonreciprocal media.  _New J. Phys._ 14, 083034 (2012).

Figure 1: Effects of gradients in the intensity of the plasmon resonances. a)
Calculation of Thomson scattering intensity, which is proportional to
$S(k,\omega)$, with different values of $\Lambda$ and $\tau=\infty$. The
spatial gradients are all assumed to have a component parallel to $\bf k$
where $k=1.03\times 10\>\rm m^{-1}$. b) Same as a) but with the direction of
the gradients reversed. c) Calculation of $S(k,\omega)$ with different values
of $\tau$ and $\Lambda=\infty$. Figure 2: Ratio of upshifted over downshifted
plasmon signals The ratio of the integrated plasmon signals is given for
different gradient conditions as well as the equilibrium case. The
intermediate gradient (red) steadily diverges from the equilibrium case (blue)
with increasing density. We see two effects for the larger gradient (green).
First, the green curve begins to diverge from the equilibrium case at a lower
density, as expected. Second, as density increases, the green curve peaks and
subsequently decreases rapidly; this is due to the coincidental minimization
of $\operatorname{Re}[{\chi^{\rm eq}\left({\bf k},\omega\right)}]$ which
emphasizes the effect of the gradient expansion terms on the DSF. Figure 3:
Effects of gradients on plasmon peak intensities. We show the variation in the
peak intensities of the plasmons with respect to the gradient parameter. For
spatial gradients this is $\Lambda k$ and for temporal gradients this is
$\tau\omega_{pe}$ . For spatial gradients we see a sharp rise in the blue
shifted plasmon and a dip in the red shifted plasmon as we approach steeper
gradients (i.e., lower gradient parameter). For temporal gradients both
plasmons are reduced with higher gradients. Figure 4: Predicted spectra. We
have compared the homogeneous case (green line) against our full inhomogeneous
scattering model (red line) using the weighted sum method in both cases and
for the plasma conditions given in the text with $\Lambda=1.45$ nm and where
$k=1.03\times 10\>\rm m^{-1}$. The weighted sum method was implemented by
assuming a linear density profile, with $n_{e}$ varying from $1.1\times
10^{23}$ cm-3 to $3.3\times 10^{23}$ cm-3 over a distance equal to $\Lambda$.
This profile is then divided into 220 equal cells and the scattering from each
cell summed together. The equilibrium structure factor (assuming an
homogeneous plasma) is also shown in the figure (blue line). It is clear that
the upshifted plasmon peak intensity for the inhomogeneous weighted sum case
is much higher than even the downshifted plasmon intensities. This plasmon
peaks at an intensity of 3 relative to the rest of the curves (not shown).