geosoft.gxpy.utility¶
Utility functions to support Geosoft Python scripts and modules.
Note
Regression tests provide usage examples: Tests
Functions
|
|
|
Name of the expected python dictionary as a json file from run_external_python(). |
|
|
|
Check the minimum API version. |
|
Return 32-bit CRC of a byte buffer. |
|
Return 32-bit CRC of a file. |
|
Return 32-bit CRC of a string. |
|
Return the Python datetime from a decimal Gregorian year. |
|
Decode a string (s) to a numpy format defined by string (f). |
|
Delete a file, does nothing if file does not exist. |
|
Delete all files that have the same file_root (without extension). |
|
Delete a folder if all files and sub-folders are accessible and deletable. |
|
Decode http response text to a dictionary. |
|
Return a dictionary from a Geosoft |
|
dictionary from a |
|
Return a dictionary of an xml string. |
|
Display a message to the user. |
|
|
|
|
|
Deprecated since version 9.2: use dummy_mask() |
|
Return a 1-D dummy mask that is True for all rows in a 2D numpy array that have a Geosoft dummy value. |
|
Returns None if dummy, otherwise the value. |
|
Replaces dummies in float data to numpy.nan. |
|
Returns the age of a file in seconds from now. |
|
Return the Geosoft temporary folder name. |
|
Return the Geosoft user configurations folder name. |
|
Return the Geosoft project folder name. |
|
Get the metadata dictionary for a geosoft data file. |
|
Return a unicode XML string of a dictionary with geosoft namespace defined. |
|
Get parameters from the Project Parameter Block. |
|
Get a dictionary shared by an external application. |
|
Deprecated since version 9.2: use gx_dummy() |
|
|
|
|
|
Return the dummy for this value, or this type. |
|
Returns True if the file exists and is currently locked by another process or is younger than age. |
|
Return True of gxtype can be stored in a 64-bit float |
|
Return True of gxtype can be stored in a 64-bit integer |
|
Returns True if any files in this folder or sub-folders are locked or younger than age. |
|
Return length of a gxtype string, 0 (False) if not a string. |
|
Create a markdoown table-of-content string from a jupyter notebook based on markdown "#". |
|
Update a dictionary by adding key-values from second dictionary. |
|
Normalize a file name string by replacing '' with '/'. |
|
Geosoft string (number, date, time, geographic) conversion to a number, always works. |
|
Geosoft string conversion to a number, raising ValueError on failure |
|
|
|
Run a python script as an external program, returning results as a dictionary. |
|
Save parameters to the Project Parameter Block. |
|
Save a dictionary to be shared by an separate application. |
|
Return a formatted string to n significant figures. |
|
current date-time as a string. |
|
Build a unique name or file name. |
|
Retrieve a URL resource as a file. |
|
|
|
Normalise (Euclidean) the last axis of a numpy array |
|
Return a unicode XML string of a dictionary. |
|
Julian year |
|
Return a decimal Gregorian calendar year from a Python datetime. |
Exceptions
|
Exceptions from |