Various tools for use with PyFEHM.
ftool.SI(quantity, unit=None)[source]¶Returns an SI measurement corresponding to a supplied non standard unit, e.g., ‘31.6 gpm’. Output reverts to FEHM format, e.g., pressures and stresses quoted in MPa.
| Parameters: |
|
|---|---|
| Returns: | Quantity in SI units. |
ftool.UTM_to_latlong(x, y, zone, hemisphere=1)[source]¶Return latitude and longitude corresponding to supplied UTM (Universal Transverse Mercator) coordinates.
| Parameters: |
|
|---|---|
| Returns: | Two column list of latitudes and longitudes. |
ftool.dict_key_check(dict, keys, dict_name)[source]¶Return False if dict contains only the supplied keys and no extras.
ftool.flatten(l)[source]¶Takes a nested list and returns a flattened list (upon list conversion of output). :param l: Nested list. :type l: lst
ftool.in_cube(pos, cube)[source]¶Tests if the 3-D point lies in an axis-aligned cube, defined as a two-element list of arrays [bottom left front, top right back].
ftool.latlong_to_UTM(lat, long)[source]¶Return UTM easting, northing, zone number and hemisphere corresponding to supplied latitude and longitude.
| Parameters: |
|
|---|---|
| Returns: | Four column list of UTM easting, northing, zone and hemisphere (1 = northern, -1 = southern). |
ftool.powspace(x0, x1, N=10, power=1)[source]¶Returns a sequence of numbers spaced according to the power law (x1-x0)**(1-power)*linspace(0,(x1-x0),N)**base + x0
| Parameters: |
|
|---|