Sensor2Sql

This module contains all functions and classes for reading a sensor file in CSS3.0 format and pushing it into the database

Functions and Classes

get_sitechannel_id_for_sensor(sensor)

Function for finding, creating and updating the site channel attached to a given sensor from the database.

Complex function that might be better off partitioned?

Parameters:sensor (Sensor) – sensor that will be used for query
Returns:sitechannel id or None or raises an error if sensor station not found
insertSensor2Database(sensor, instrument=False)

Function for inserting the sensor array to the database

Parameters:
  • sensor (Sensor) – sensor that will be inserted to the database
  • instrument (instrument) – sensor will be attached to this instrument. If not given, then instrument will be searched from the instrument table.