ConnectTool
 All Classes Namespaces Files Functions Variables Pages
Classes | Functions
module_fieldline Namespace Reference

Classes

class  FieldlineError
 
class  Fieldline
 Class represent a fieldline. More...
 

Functions

def write_fieldline_ascii
 
def sphe2cart
 
def cart2sphe
 
def get_footpoint
 
def check_fieldline
 Check if fieldlines are correct. More...
 
def open_fieldline
 Check if fieldlines are open. More...
 
def closed_fieldline
 Check if fieldlines are closed. More...
 
def get_delta
 Get the norm between 2 fieldlines along the first fieldline. More...
 
def reverse
 Reverse fieldline indexation. More...
 
def helicoid_z2
 Build an helicoidal fieldline around (lat0,lon0) from r0 to r1. More...
 
def find_polarity
 Find polarity of a bunch of fieldlines. More...
 

Function Documentation

def module_fieldline.cart2sphe (   x,
  y,
  z 
)
Convert 3 cartesian vectors coordinate x,y,z into fieldline.

Here is the caller graph for this function:

def module_fieldline.check_fieldline (   fieldlines)

Check if fieldlines are correct.

Criterion:
If r > 0 and 0 <= lon <= 360 and -90 <= lat <= 90 along fieldline, fieldline ok.

Returns
list of boolean, same index as fieldlines list
def module_fieldline.closed_fieldline (   fieldlines)

Check if fieldlines are closed.

:
If r[0] < 1.1Rs and r[-1] < 1.1Rs, then open.

Returns
list of open fieldlines
def module_fieldline.find_polarity (   fieldlines)

Find polarity of a bunch of fieldlines.

Look only at fieldline first point.
For all fieldline: Br >= 0, polarity = 1, Br < 0, polarity = -1 N(polarity=1) >= N(polarity=-1), polarity_glo = 1

def module_fieldline.get_delta (   fieldline1,
  fieldline2 
)

Get the norm between 2 fieldlines along the first fieldline.

Parameters
[out]norm,:fieldline1.nsize array. At each fieldline1 point, gives the minimum distance from fieldline2.
[out]index,:fieldline1.nsize array. At each fieldline1 point, gives the fieldline2 index where minimum distance is found.

Here is the call graph for this function:

def module_fieldline.get_footpoint (   fieldlines,
  loc = 'last' 
)
Returns a list of fieldlines footpoint as Coordinates. 
def module_fieldline.helicoid_z2 (   r0,
  r1,
  lat0,
  lon0,
  npoint,
  z0 = 4 
)

Build an helicoidal fieldline around (lat0,lon0) from r0 to r1.

Helicoid radius is some z**2 function dependant.

Returns
Fieldline() object.
def module_fieldline.open_fieldline (   fieldlines)

Check if fieldlines are open.

:
If r[0] > 2Rs or r[-1] > 2Rs, then open.

Returns
list of open fieldlines
def module_fieldline.reverse (   fieldline)

Reverse fieldline indexation.

Do not return another fieldline, just modify it.

def module_fieldline.sphe2cart (   fieldline)
Convert fieldline spherical coordinate into 3 cartesian vectors coordinate x,y,z.

Here is the caller graph for this function:

def module_fieldline.write_fieldline_ascii (   fieldline,
  filename 
)
Given a Fieldline structure, write each composant in filename file according this format:
r(1) lon(1) lat(1) br(1) blon(1) blat(1)
r(2) lon(2) lat(2) br(2) blon(2) blat(2)
...
r(nsize) lon(nsize) lat(nsize) br(nsize) blon(nsize) blat(nsize)