# spacepy.pybats.bats.Stream

class `spacepy.pybats.bats.``Stream`(bats, xstart, ystart, xfield, yfield, style='mag', type='streamline', method='rk4', var_list='all', extract=False, maxPoints=20000, *args, **kwargs)

  A class for streamlines. Contains all of the information about the streamline, including extracted variables.

  Upon instantiation, the object will trace through the vector field determined by the “[x/y]field” values and the Bats object “bats”.

  Parameters: | bats : Bats `Bats2d` object through which to trace. xstart : float X value of location to start the trace. ystart : float Y value of location to start the trace. xfield : str Name of variable in `bats` which contains X values of the field yfield : str Name of variable in `bats` which contains Y values of the field
  Other Parameters:
  | style : str Sets line style, including colors. See `set_style()` for details. (Default ‘mag’) type : str (Default ‘streamline’) method : str Integration method. The default is Runge-Kutta 4 (‘rk4’) which gives a good blend of speed and accuracy. See the test functions in `trace2d` for more info. The other option is a simple Euler’s method approach (‘eul’). (Default ‘rk4’) extract : bool (Default: False) Extract variables along stream trace and save within object. maxPoints : int (Default : 20000) Maximum number of integration steps to take. var_list : string or sequence of strings (Default : ‘all’) List of values to extract from dataset. Defaults to ‘all’, for all values within bats.

  Notes

  Methods

  `set_style`(style) | Set the line style either using a simple matplotlib-type style string or using a preset style type.
  `treetrace`(bats[, maxPoints]) | Trace through the vector field using the quad tree.
  `trace`(bats) | Trace through the vector field.
  `plot`(ax, *args, **kwargs) | Add streamline to axes object “ax”.

  `set_style`(style)

    Set the line style either using a simple matplotlib-type style string or using a preset style type. Current types include:

    ‘mag’ : treat line as a magnetic field line. Closed lines are
      white, other lines are black.
  `treetrace`(bats, maxPoints=20000)

    Trace through the vector field using the quad tree.

  `trace`(bats)

    Trace through the vector field.

  `plot`(ax, *args, **kwargs)

    Add streamline to axes object “ax”.