6.1.1.1.1.5. thyrsis.database.load_measure module

load measures in site database

USAGE

  • for concentration :

    python -m thyrsis.database.load_measure [-d] site element_chimique units concPoint.dat

  • for potential :

    python -m thyrsis.database.load_measure [-d] site potFile.dat

try to load measure into the site database

  • site is the site name (str),

  • potPoint.dat is a file with measured potential at the point ‘Point’,

  • concPoint.dat is a file with measured concentration at the point ‘Point’,

  • chemical is a chemical element of the elements_chimiques table (str),

  • unit is the unit of the concentration,

  • -d is an option used to delete corresponding measured values

potPoint.dat and concPoint.dat are blank-separated text files with format :

dd/mm/YYYY[ HH:MM[:SS]] value[ incertitude]

thyrsis.database.load_measure.load_measure(conn, siteName, fileName, chemicalName=None, units=None, delete=False)

load measures values into the current database for a site

Parameters
  • conn (sqlite3.Connection) – connection on a sqlite database

  • siteName (string) – name of the site

  • fileName (string) – path to a csv file of measures

  • chemicalName (string) – name of chemicals to delete if already existing

  • units (string) – units of the measures

  • delete (bool) – flag to delete existing measure with the same name

Returns

None