Velocity distribution function¶
vdf extension to xarray¶
AIDA module responsible for the vdf handling. etienne.behar
-
class
aidapy.aidaxr.vdf.
AidaAccessorVDF
(xarray_obj)[source] Xarray accessor responsible for the vdf utilities.
-
interpolate
(start_time, end_time, start_time_sub, end_time_sub, species='electron', frame='instrument', grid_geom='spher', v_max=None, resolution=60, interp_schem='near', verbose=True)[source] Main method of the AidaAccessorVDF.
Pre-processes the loaded data, initialises the rotation matrices and translations vectors, selects a time sub-interval, interpolates the data, post-process them and save them as new variables of the xarray dataset.
- Parameters
start_time (datetime.datetime) – The start time of the global period of interst.
end_time (datetime.datetime) – The end time of the global period of interest.
start_time_sub (datetime.datetime) – The start time of the local period of interest.
end_time_sub (datetime.datetime) – The end time of the local period of interest.
species (str) – The species to be analysed, either ‘electron’ or ‘ion’
frame (str) –
- The reference frame in which the data will be analysed and
visualised.
grid_geom (str) – The geometry of the grid-of-interest, along which VDF values will be interpolated. Either ‘cart’ for cartesian geometry, ‘spher’ or spherical, or ‘cyl’ for cylindrical.
v_max (float) – The maximum extend of the grid-of-interest. If None, taken as the maximum instrument speed coverage.
resolution (int) – Resolution of the grid-of-interest. Advised is between 50 and 200 for reasonable quality and computation time.
interp_schem (str) – Inteprolation scheme used by the method. Either ‘near’ for nearest-neighbour, ‘lin’ for tri-linear, or ‘cub’ for tri-cubic interpolation. The two first are provided by scipy (https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.RegularGridInterpolator.html) and the last by the tricubic package (https://pypi.org/project/tricubic/).
- Returns
xr_mms –
- The xarray dataset. The interpolation products are added to the dataset
at the end of the method.
- Return type
xarray dataset
-
plot
(ptype='1d', plt_contourf=False, cmap='RdBu_r')[source] Calls to plotting methods from aidapy.tools.vdf_plot
-