ozzy.fields
This submodule includes functions to analyze field data.
vphi_from_fit
§
vphi_from_fit(
da,
x_zero,
xvar="x1",
tvar="t",
window_len=1.0,
k=1.0,
boundary="trim",
quasistatic_fixed_z=False,
)
Measure the phase (\(\phi\)) and phase velocity (\(v_\phi\)) from stacked lineouts of a wave (waterfall data) by fitting a sinusoidal function to blocks of data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
DataArray
|
The input xarray.DataArray containing the data to be analyzed. The data should be two-dimensional: time or propagation distance along one dimension, and a longitudinal coordinate along the other dimension. |
required |
|
float
|
Position along the longitudinal coordinate where the sine should be considered to start, and with respect to which the phase will be measured. For example, a seed position. |
required |
|
str
|
The name of the spatial dimension along which to perform the fit. Default is |
'x1'
|
|
str
|
The name of the time or propagation dimension. Default is |
't'
|
|
float
|
The length of the window (in units of the plasma wavelength) over which to perform the fit. Default is |
1.0
|
|
float | str
|
The wavenumber to use in the definition of the window length. If |
1.0
|
|
str
|
How to handle boundaries when coarsening the data into blocks. One of |
'trim'
|
|
bool
|
If True, the phase velocity is calculated assuming a quasistatic approximation with a fixed z-dimension. Default is False. |
False
|
Returns:
Type | Description |
---|---|
Dataset
|
A dataset containing the calculated phase velocity ( |