magnetopause3d

Finds the magnetopause position by tracing steamines of the plasma flow for three-dimensional Vlasiator runs. Needs the yt package.

magnetopause3d.make_surface(coords)

Defines surface constructed of input coordinates as triangles Returns list of verts and vert indices of surface triangles

coordinates must be in form […[c11, c21, c31, … cn1],[c12, c22, c32, … cn2],… where cij = [xij, yij, zij], i marks slice, j marks yz-plane (x_coord) index

How it works: Three points make a triangle, triangles make the surface. For every two planes next to each other: - take every other point from plane1, every other from plane2 (in order!) - from list of points: every three points closest to each other make a surface

Example: plane 1: [v1, v2, v3, v4] plane 2: [v5, v6, v7, v8]

-> list: [v1, v5, v2, v6, v3,…] -> triangles: v1 v5 v2 v5 v2 v6 v2 v6 v3 . . .