hydrac.instruments.sbe

Seabird instruments (hydrac.instruments.sbe)

class hydrac.instruments.sbe.SBE(name)[source]

Bases: hydrac.instruments.physicalparam.PhysicalParam

Seabird multiparameter probe instrument class.

Base class : hydrac.instruments.physicalparam.PhysicalParam

The SBE class reads the seabird raw csv files (UTF-8 encoding) and stores the valuable information into the modified dictionnary param with the common shape handled by hydrac (see hydrac.instruments.physicalparam)

A general description of the different Seabird profiling instruments is given on their website (https://www.seabird.com/profiling/family?productCategoryId=54627473767).

A typical example of how should the data considered is as follows

>>> K = SBE('Campaign_1')

The above line will prompt the user to select one or multiple files in a directory, read and store each file data into param instanciated in :class: hydrac.instruments.physicalparam.PhysicalParam, as separate modified dictionnaries PX, X being the file number. Ex: for the first file loaded in param, one can look at the differents variables stored in param.P0

>>> K.param.P0.keys()
dict_keys(['time', 'Depth', 'Temperature', 'Salinity', 'Turbidity'...])

One also gets the base Acoustic class instance instr_type:

>>> K.instr_type
'param_phy'

Or methods:

>>> K.preproc_acoustic_data()

The hydrac.instruments.sbe.SBE.__init__() automatically calls the hydrac.instruments.physicalparam.PhysicalParam.preproc_phy_shape() method from the PhysicalParam base class, dedicated to affecting a deployment strategy to the data. So while loading the data, the user will be prompted for extra information like the deployment strategy, the wish or not to resample the data…

>>> K = SBE('Campaign_1')
# The user is prompted for a deployment strategy
Deployment Mod :
Mooring
# The user is prompted for potential time averaging of the data (note)
# the user is not prompted for spatial averaging in this case as these
# measurements are point-wise.
Select a temporal bin size foraveraging of moored physical parameter
instrument (0 for no averaging):
2
Parameters:
instr_type : str {‘param_phy’}

Type of instrument

name : str, {‘sbe’}

Instrument name

file_select(self)[source]

User input selection of the target files to read

file_len(self, fname, e)[source]

Calculates file length

find_encoding(self, name, encodings=['utf-8', 'ISO-8859-1', 'ascii', 'windows-1250', 'windows-1251', 'windows-1252'])[source]

Select right encoding and opens file using a good one

load_data(self)[source]

Launching file reading

days_to_hmsm(self, days)[source]

Converts fractional days (between 0 and 1) to hour,minutes,sec, millisec.

JulianDate_to_MMDDYYY(self, y, jd)[source]

Converts Julian days to month,day,year

julian_to_datenum(self, timeJ, start_date_)[source]

Converts Julian days to datenum

read_SBE(self)[source]

Reads a unique SBE .csv file

Classes

SBE(name) Seabird multiparameter probe instrument class.