irfpy.mars.bowshock

Bow shock model by Vignes et al.

class irfpy.mars.bowshock.BowshockVignes[source]

Bases: object

Vignes et al, (TBC) model for bow shock position.

>>> bsx, bsr = BowshockVignes.xr()

Conic curve (hyperbola) model with a formulation of

\[\begin{split}x &= R \cos\theta + x_0 \\ y &= R \sin\theta\end{split}\]

with

\[R = \frac{L}{1+\epsilon\cos\theta}\]

The parameters are

\[\begin{split}L &= 2.04 \\ \epsilon &= 1.03 \\ x_0 &= 0.64\end{split}\]

in the unit of Martian radii.

L = 2.04
e = 1.03
x0 = 0.64
classmethod xr()[source]

Return the bow shock position.

Returns:

The array with shape of (2, 180). Unit is in Rm.

>>> print(BowshockVignes.xr()[:, 50])
[1.49948598 0.77115753]
classmethod inside(x, y, z)[source]

Return True if s/c is in bow shock.

>>> print(BowshockVignes.inside(1.2, 0, 0))
True
>>> print(BowshockVignes.inside(3, 0, 0))
False
irfpy.mars.bowshock.BowshockVignesScaled(scale=1)[source]

Vignes et al., while scaled by changing the parameter L.

Parameters:

scale – Default 1.

Returns:

A Vignes model with scaled by the given scale.

10% bigger model is obtained as follows

>>> vig10 = BowshockVignesScaled(1.1)    # 10% bigger model
>>> x10, r10 = vig10.xr()
>>> plt.plot(x10, r10)      
>>> vig10.inside(0, 2.7, 0)
True
>>> x00, r00 = BowshockVignes.xr()
>>> plt.plot(x00, r00)      
>>> BowshockVignes.inside(0, 2.7, 0)
False