Bay-Delta SELFE Tools

read_ts Module

read_ts.read_ts(fpath, start=None, end=None, force_regular=True, selector=None)

Read a time series from a text file in various formats. This function asks readers for different file formats to attempt to read the file. The first reader that confirms its appropriateness will be attempted. The order of this is not guaranteed..

Parameters :

fpath: str :

a file path to read in

start: datetime.datetime, optional :

time to start reading

end: datetime.datetime, optional :

time to end reading

Returns :

vtools.data.timeseries.TimeSeries :

the time series from the file

dict :

metadata of the time series

read_ts.read_noaa(fpath, start=None, end=None, force_regular=True)
read_ts.read_wdl(fpath, start=None, end=None, force_regular=True)
read_ts.read_cdec(fpath, start=None, end=None, force_regular=True)
read_ts.read_usgs(fpath, start=None, end=None, force_regular=True)