# spacepy.seapy.Sea

class spacepy.seapy.Sea(data, times, epochs, window=3.0, delta=1.0, verbose=True)

  SeaPy Superposed epoch analysis object

  Initialize object with data, times, epochs, window (half-width) and delta (optional). ‘times’ and epochs should be in some useful format Includes method to perform superposed epoch analysis of input data series

  Parameters:
    data array_like

      list or array of data

    times array_like

      list of datetime objects (or list of serial times)

    epochs array_like

      list of datetime objects (or serial times) for zero epochs in SEA

    window datetime.timedelta

      size of the half-window for the SEA (can also be given as serial time)

    delta datetime.timedelta

      resolution of the input data series, which must be uniform (can also be given as serial time)

  Notes

  Output can be nicely plotted with `plot()`, or for multiple objects use the `multisea()` function

  `sea`(**kwargs) | Method called to perform superposed epoch analysis on data in object.
  `plot`([xquan, yquan, xunits, yunits, ...]) | Method called to create basic plot of superposed epoch analysis.

  sea(**kwargs)

    Method called to perform superposed epoch analysis on data in object.

    Uses object attributes obj.data, obj.times, obj.epochs, obj.delta, obj.window, all of which must be available on instantiation.

    Other Parameters:
      storedata boolean

        saves matrix of epoch windows as obj.datacube (default = False)

      quartiles list

        calculates the quartiles as the upper and lower bounds (and is default);

      ci float

        will find the bootstrapped confidence intervals of ci_quan at the ci percent level (default=95)

      mad float

        will use +/- the median absolute deviation for the bounds;

      ci_quan string

        can be set to ‘median’ (default) or ‘mean’

    Notes

    A basic plot can be raised with `plot()`

  plot(xquan='Time Since Epoch', yquan='', xunits='', yunits='', epochline=True, usrlimy=[], show=True, target=None, loc=111, figsize=None, dpi=None, transparent=True, color='#7F7FFF')

    Method called to create basic plot of superposed epoch analysis.

    Parameters:
      Uses object attributes created by the obj.sea() method.
    Other Parameters:
      xquan str

        (default = ‘Time since epoch’ ) - x-axis label.

      yquan str

        default None - yaxus label

      xunits str

        (default = None) - x-axis units.

      yunits str

        (default = None) - y-axis units.

      epochline boolean

        (default = True) - put vertical line at zero epoch.

      usrlimy list

        (default = []) - override automatic y-limits on plot.

      transparent boolean

        (default True): make patch for low/high bounds transparent

      color str

        Color to use for the patch if not transparent. (default #7F7FFF, a medium blue)

    Notes

    If both quan and units are supplied, axis label will read ‘Quantity Entered By User [Units]’