pyrfu.pyrf.dot module#

pyrfu.pyrf.dot.dot(inp1, inp2)[source]#

Computes dot product of two fields.

Parameters:
Returns:

out – Time series of the dot product Z = X.Y.

Return type:

xarray.DataArray

Examples

>>> from pyrfu import mms, pyrf

Time interval

>>> tint = ["2019-09-14T07:54:00.000", "2019-09-14T08:11:00.000"]

Load magnetic field, electric field and spacecraft position

>>> r_mms, b_mms, e_mms = [[] * 4 for _ in range(3)]
>>> for mms_id in range(1, 5):
>>>         r_mms.append(mms.get_data("R_gse", tint, mms_id))
>>>         b_mms.append(mms.get_data("B_gse_fgm_srvy_l2", tint, mms_id))
>>>         e_mms.append(mms.get_data("E_gse_edp_fast_l2", tint, mms_id))

Compute current density using curlometer technique

>>> j_xyz, _, _, _, _, _ = pyrf.c_4_j(r_mms, b_mms)

Compute the electric at the center of mass of the tetrahedron

>>> e_xyz = pyrf.avg_4sc(e_mms)

Compute J.E dissipation

>>> je = pyrf.dot(j_xyz, e_xyz)