Sensor

Contains information relevant to Sensor class

class Sensor(data=None)

Class for sensor information. Comes from css sensor format.

Parameters:

data (Array) – all the relevant data for Sensor in an array. These values are accessed by its numerations.

Variables:
  • instruments (Array) – list of all instruments related to sensor
  • time (float) – epoch time of start of recording period
  • endtime (float) – epoch time of end of recording period
  • jdate (datetime) – julian date
  • calratio (float) – calibration ratio
  • calper (float) – calibration period
  • tshift (float) – correction to data processing time
  • instant (string) – (y/n) discrete/continuing snapshot
  • sitechan_id (int) – id of the site channel to which sensor refers to.
  • intrument_id (int) – id of the instrument to which the sensor refers to. On reading Geotool source file it matches the Geotool table value After insertion it matches the NorDB instrument table value
  • lddate (datetime) – loading date of this info
  • station_code (int) – code of the station the sensor is attached to
  • channel_code (int) – channel code of the sensor
  • TIME (int) – Enumeration of the data list. Value of 0
  • ENDTIME (int) – Enumeration of the data list. Value of 1
  • JDATE (int) – Enumeration of the data list. Value of 2
  • CALRATIO (int) – Enumeration of the data list. Value of 3
  • CALPER (int) – Enumeration of the data list. Value of 4
  • TSHIFT (int) – Enumeration of the data list. Value of 5
  • INSTANT (int) – Enumeration of the data list. Value of 6
  • STATION_CODE (int) – Enumeration of the data list. Value of 7
  • CHANNEL_CODE (int) – Enumeration of the data list. Value of 8
  • SITECHAN_ID (int) – Enumeration of the data list. Value of 9
  • INTRUMENT_ID (int) – Enumeration of the data list. Value of 10
  • LDDATE (int) – Enumeration of the data list. Value of 11
get_on_and_off_times_as_datetimes()

Method for finding the datetimes for sensor on and off dates.

Parameters:sensor (Sensor) – sensor that will be used for query
Returns:sensor on time and off date
readSensorStringToSensor(sen_line)

Function for reading sensor string into a Sensor object

Parameters:sen_line (str) – css sensor string
Returns:Sensor object