olm.loggers package

Submodules

olm.loggers.CampbellToolkit module

olm.loggers.CampbellToolkit.read_dat(dat_file)[source]

Reads in data from a .dat file produced by Campbell’s data logging software.

Parameters:
dat_filestring

The name of the .dat file to read.

Returns:
dfpandas.DataFrame

DataFrame containing data from .dat file.

olm.loggers.CyclopsToolkit module

olm.loggers.CyclopsToolkit.read_cat(cat_file)[source]

Reads in data from a concatenated Cyclops file.

Parameters:
dat_filestring

The name of the Cat.txt file to read.

Returns:
dfpandas.DataFrame

DataFrame containing data from cat file.

olm.loggers.CyclopsToolkit.read_single(txt_file)[source]

Reads in data from a single non-concatenated Cyclops file.

Parameters:
txt_filestring

The name of the Cat.txt file to read.

Returns:
dfpandas.DataFrame

DataFrame containing data from cat file.

olm.loggers.HoboToolkit module

olm.loggers.HoboToolkit.read_hobo_csv(csv_file, all_columns=False)[source]

Reads data from a csv file exported from HOBOware.

Parameters:
csv_filestring

A string containing the file name of the csv file to be read.

all_columnsboolean (optional)

Determines whether to read in all columns or just ones that we search for and relabel (RH, DewPt, Abs Pres, Temp, Attached, Stopped, Connected, EOF, Cond High Range, Cond Low Range, DO). Default = False

Returns:
dfpandas.DataFrame

DataFrame containing data from HOBO csv file.

olm.loggers.SchlumbergerCTDToolkit module

olm.loggers.SchlumbergerCTDToolkit.concatCTD(dflist, zero_shift=True, n_to_average=5, offset_list=[], offset_dates=[])[source]

Accepts a list of CTD DataFrames and concatenates them.

Parameters:
dflistlist

List of pandas.DataFrames to concatenate.

zero_shiftboolean

If set to True, the pressure values will be adjusted at the time of each join, assuming that flow depth before and after the join was equal. If set to False, no adjustment will be made in pressure values. This is useful when downloading the logger may have resulted in a slightly different position in the water column. (Default = True)

n_to_averageint

Number of data points to average before and after join in order to determine data offset value for pressure

offset_listlist

List of offsets to be applied manually to pressure data.

offset_dateslist

List of datetime strings corresponding to manual offsets.

Returns:
(concatenatedpandas.DataFrame, offset_listpandas.DataFrame)

A tuple is returned with the first item being a DataFrame object containing the concatenated data and the second item in the tuple being a DataFrame object containing offsets with datetimes of the offsets as an index.

olm.loggers.SchlumbergerCTDToolkit.readBaro(csvfile)[source]

Reads data from a CSV or MON file from a Schlumberger Baro Diver.

Parameters:
csv_filestring

A string containing the file name of the CSV or MON file to be read.

Returns:
dfpandas.DataFrame

DataFrame containing data from HOBO csv file.

olm.loggers.SchlumbergerCTDToolkit.readCTD(csvfile)[source]

Reads data from a CSV or MON file exported from a Schlumberger CTD Diver.

Parameters:
csv_filestring

A string containing the file name of the CSV or MON file to be read.

Returns:
dfpandas.DataFrame

DataFrame containing data from HOBO csv file.

olm.loggers.TruBluToolkit module

olm.loggers.TruBluToolkit.readTruBlu(csvfile)[source]

Reads data from a CSV file exported from a TruBlu logger.

Parameters:
csv_filestring

A string containing the file name of the CSV or MON file to be read.

Returns:
dfpandas.DataFrame

DataFrame containing data from a TruBlu csv file.

olm.loggers.WTWpHToolkit module

olm.loggers.WTWpHToolkit.euroParser(datestring)[source]

Date parser for European style dates separated by ‘.’ characters.

Parameters:
datestringstring

String containing Euro style date

Returns:
dateTimedatetime object
olm.loggers.WTWpHToolkit.readpH(csvfile)[source]

Reads data from a CSV file produced by WTW-pH data loggers.

Parameters:
csvfilestring

Name of the CSV file to be read.

Returns:
dfpandas.DataFrame

DataFrame object containing pH data.

olm.loggers.loggerScripts module

Contains functions that are useful in general for manipulation of data logger data

olm.loggers.loggerScripts.joinAndResampleLoggers(loggerlist, interval, suffixes=[], how='inner', interpolate=False, limit=None)[source]

Joins and resamples data from DataFrame objects provided in a list.

Parameters:
loggerlistlist

List of logger pandas.core.dataframe.DataFrame objects to be joined.

intervalstring

Pandas offset string (http://pandas.pydata.org/pandas-docs/stable/timeseries.html#offset-aliases) on which the DataFrames should be resampled (e.g. ‘H’=hour, ‘T’=minute, ‘D’=day).

suffixeslist

A list of strings (same length as loggerlist) that contains suffixes to be applied to each logger. This is useful if multiple loggers have the same column names.

howstring

Method for joining loggers (default = ‘inner’).

interpolateboolean

Whether data should be interpolated to fill gaps in rows (default=False).

limitint

Maximum number of consecutive NaNs to fill if data are interpolated.

Returns:
joinedpandas.core.dataframe.DataFrame

DataFrame Object that contains joined DataFrames.

olm.loggers.loggerScripts.joinLoggers(loggerlist, how='inner', interpolate=False)[source]

Joins the data from a list of logger DataFrame objects together.

Parameters:
loggerlistlist

A list of logger DataFrame objects to be joined.

howstring, optional

How the two DataFrames are to be joined. Default is inner.

interpolateboolean, optional

Determines whether empty rows are to be filled with data via interpolation. Uses Pandas Dataframe.interpolate(). Default = False

Returns:
joinedpandas.DataFrame

DataFrame of joined loggers.

olm.loggers.loggerScripts.linear_correction(rawSeries, correctionSeries)[source]

Uses a Pandas Series of spot measured values to linearly correct time series data from a logger.

Parameters:
rawSeriespandas.core.series.Series

A Pandas Series that contains the time series data to be corrected.

correctionSeriespandas.core.series.Series

A Pandas Series that contains spot measurement data that are to be used to correct rawSeries.

Returns:
rawSeriespandas.core.series.Series

A corrected version of the rawSeries time series data.

olm.loggers.loggerScripts.manualCompare(logger, manual, value_name='', ltag='_log', mtag='_man')[source]

Function to extract logger data with same timestamps as manual measurements for comparison. Both data sets are resampled on an hourly interval to assure alignment of indicies.

Parameters:
loggerpandas.core.series.Series

A Pandas TimeSeries containing a single column and time stamps as indices.

manualpandas.core.series.Series

A Pandas TimeSeries containing a single variable from the manual data set

value_namestring

A string to use as the base for the collumn labels in the output DataFrame.

ltagstring

A suffix to be added to the logger column name, or used as the logger column name if value_name is not set.

mtagstring

A suffix to be added to the manual measurement column name, or used as the manual measurement column name if value_name is not set.

Returns:
joinedpandas.core.dataframe.DataFrame

A DataFrame object containing values of manual measurements and corresponding values from the logger time series using the aligned index that is resampled to the hour.

olm.loggers.loggerScripts.shiftLogger(logger, shift_to, align_at_start=True)[source]

Function to shift DataFrame timestamps to start or end at a specific datetime.

Parameters:
loggerpandas.core.series.Series or pandas.core.dataframe.Dataframe

A Pandas TimeSeries or DataFrame containing time stamps as indices.

shift_tostring

A string that contains the date and time that the logger series should be shifted to. By default this is the correct starting time (first time stamp) of the series.

align_at_startboolean

If True, shift_to is assumed to represent the correct starting date for the series. If False, shift_to is assumed to represent the correct final date of the series. (default=True)

Returns:
loggerpandas.core.series.Series or pandas.core.dataframe.DataFrame

A Series or DataFrame object that contains the correct shifted time stamps.

Module contents