sdf_xarray.dataarray_accessor.EpochAccessor#
- class sdf_xarray.dataarray_accessor.EpochAccessor(xarray_obj)[source]#
Bases:
object- Parameters:
xarray_obj (xr.DataArray)
Methods
__init__(xarray_obj)animate(*args, **kwargs)Generate animations of Epoch data.
plot(*args, **kwargs)Builds upon
xarray.DataArray.plotwhile changing some of its default behaviours.- animate(*args, **kwargs)[source]#
Generate animations of Epoch data.
- Parameters:
args – Positional arguments passed to
animation().kwargs – Keyword arguments passed to
animation().
- Return type:
Examples
>>> anim = ds["Electric_Field_Ey"].epoch.animate() >>> anim.save("animation.gif") >>> # Or in a jupyter notebook: >>> anim.show()
- plot(*args, **kwargs)[source]#
Builds upon
xarray.DataArray.plotwhile changing some of its default behaviours.These changes are:
Flips the default axes order for 2D plots so that x and y are on the correct axes. This exists because plotting of 2D data in xarray uses the
xarray.plot.pcolormeshfunction which takes assumes thatx = dim[1]andy = dim[0].
- Parameters:
args – Positional arguments passed to
xarray.DataArray.plot.kwargs – Keyword arguments passed to
xarray.DataArray.plot.
- Return type:
DataArrayPlotAccessor