3.1.2.11. thyrsis.simpleprovider module¶
-
class
thyrsis.simpleprovider.
SimpleProvider
(database, resultColumn, units)¶ Bases:
object
Abstract provider
-
PROVIDER_KEY
= 'simple_provider'¶
-
altitudeAt
(point)¶ return altitude given point, interpolate values if needed
- Parameters
point (tuple) – point xy
- Returns
value
- Return type
float
-
availableColumns
()¶ returns a list (display name, colummn name) for available results
- Returns
available column
- Return type
list
-
availableUnits
()¶ Return available units
- Returns
available units
- Return type
dict
-
contours
()¶ return a map with the contour (name, group) as key and an array of vertices as values, contours are 3D
- Returns
contours
- Return type
dict
-
conversionFactor
(units=None)¶ conversion from the set units to any units, if units is not specify, return in SI units
- Parameters
units (string) – units
-
database
()¶ Return db path
- Returns
db path
- Return type
string
-
date
()¶ Return a current date
- Returns
dates list
- Return type
list
-
dates
()¶ return a list of dates in case node values vary with time
- Returns
list of dates
- Return type
list
-
description
()¶ Return description
- Returns
description
- Return type
string
-
displayName
= {'concentration': 'Concentration', 'potentiel': 'Potentiel', 'vitesse_darcy_norme': 'Vitesse de Darcy'}¶
-
elementValues
()¶ return values at elements
- Returns
values at nodes
- Return type
ndarray
-
mass_balance
()¶ compute mass balance
- Return sat
sat values
- Rtype sat
list
- Return out
out values
- Rtype out
list
- Return insat
insat values
- Rtype insat
list
-
maxValue
(index=None)¶ Return max mesh value
- Parameters
index (dict) – node index
- Returns
max value
- Return type
float
-
measuresAt
(point, withinDistance=0.5)¶ returns a map of measures in the vicinity of the considered point the map as the mesure type as key and [(date, value, uncertainty)] as values
- Parameters
point (tuple) – point xy
withinDistance (float) – snap distance
- Returns
measures
- Return type
dict
-
minValue
(index=None)¶ Return min mesh value
- Parameters
index (dict) – node index
- Returns
min value
- Return type
float
-
name
()¶ Return provider key
- Returns
key
- Return type
string
-
nodeCoord
(zColumn='0')¶ return a list of coordinates
- Parameters
zColumn (string) – formula for column height or altitude
- Returns
return a list of coordinates
- Return type
ndarray
-
nodeValues
()¶ return values at nodes
- Returns
values at nodes
- Return type
ndarray
-
resultColumn
()¶ Return current column
- Returns
current column
- Return type
string
-
scatters
()¶ return a map with the contour name as key and an point as value
- Returns
scatters
- Return type
list
-
setDate
(didx)¶ Set current date index
- Parameters
didx (integer) – date index
-
setDates
(dates)¶ set list of dates in case node values vary with time
- Parameters
dates (list) – list of dates
-
setResultColumn
(columnName)¶ Set the current column
- Parameters
columnName (string) – columnName
-
setUnits
(units)¶ Set units
- Parameters
units (string) – units
-
sourceUnits
= {'concentration': 'kg/m³', 'potentiel': 'm', 'vitesse_darcy_norme': 'm/s'}¶
-
units
()¶ Return current units
- Returns
units
- Return type
string
-
valueAtElement
()¶ Return if the mesh is element based
- Returns
state
- Return type
bool
-
valuesAt
(point, svalue=False)¶ return a list of values at a given point, interpolate values if needed, returns sigma values if required and available
- Parameters
point (tuple) – point xy
svalue (bool) – sigma values flag
- Returns
value
- Return type
float
-