tidalfit class

class csi.tidalfit(constituents='all', linear=False, steps=None, cossin=False, verbose=True)
buildG(timeseries, chunks=None, linear=False, steps=None, constituents='all', derivative=False)

Builds the G matrix we will invert. Args:

  • timeseries : Timeseries instance.

  • chunks : List of chunks of dates [[start1, end1], [start2, end2], …[startn, endn]].

  • linear : True/False.

  • steps : List of datetime to add steps.

  • constituents : List of consituents.

doFit(timeseries, tZero=datetime.datetime(2001, 1, 1, 0, 0), chunks=None)

Performs the fit on the chunks of data specified in chunks. Args:

  • timeseries: Timeseries instance.

  • tZero : Sets the origin time (datetime instance).

  • chunksif not None, provide a list: [[start1, end1], [start2, end2], …[startn, endn]].

    if None, takes all the data.

findPeaksTidalModel(timeseries, maximum=True, minimum=True)

Returns all the local maximums (if True) and minimums (if True) in the modeled tidal signal.

predict(timeseries, constituents='all', linear=False, steps=True, cossin=False, derivative=False)

Given the results of the fit, this routine predicts the time series. Args:

  • timeseries : timeseries instance.

  • constituents : List of constituents (default: ‘all’)

  • linear : Include the linear trend (default: False).

  • steps : Include the steps (default: False).

  • cossin : Add a simple cos+sin term

  • derivativeIf True, stores results in timeseries.deriv,

    else, stores results in timeseries.synth