Analysis Tools
SPEDAS.current_density
— Functioncurrent_density(B, V)
Calculate the current density time series from the magnetic field (B) and plasma velocity (V) time series.
Assume 1-D structure along the z-direction. Remember to transform the coordinates of B and V first (e.g. using mva
Utilities
Most of the utilities operate on the time dimension by default, but you can specify other dimensions using the dims
parameter. See the API reference for a complete list of available functions and their parameters.
These utilities are designed to simplify common data analysis tasks for time series data. While most are thin wrappers around existing Julia functions, they ensure proper handling of metadata and dimensions specific to space physics datasets.
Arithmetic
SPEDAS.tcross
— Functiontcross(x, y; dims=TimeDim, stack=nothing)
Compute the cross product of two (arrays of) vectors along the dims
dimension.
References:
- https://docs.xarray.dev/en/stable/generated/xarray.cross.html
SPEDAS.tderiv
— Functiontderiv(data, times; dims = 1)
Compute the time derivative of data
with respect to times
.
SPEDAS.tdot
— Functiontdot(x, y; dims=TimeDim)
Dot product of two arrays x
and y
along the dims
dimension.
SPEDAS.tsubtract
— Functiontsubtract(x, f=nanmedian; dims=timedim(x))
Subtract a statistic (default function f
: nanmedian
) along dimensions (default: time dimension) from x
.
Time-Domain Operations
SPEDAS.tclip
— Functiontclip(d, t0, t1)
Clip a dimension or DimArray
to a time range [t0, t1]
.
SPEDAS.tview
— Functiontview(d, t0, t1)
View a dimension or DimArray
in time range [t0, t1]
.
Missing docstring for tmask
. Check Documenter's build log for details.
SPEDAS.tshift
— Functiontshift(x; dim=TimeDim, t0=nothing, new_dim=nothing)
Shift the dim
of x
by t0
.