Module io

Tools used for loading and writing a station database to and from disk. These functions are used in most scripts bundled with this package.

stdb.io.load_db(fname, binp=True, keys=None)

Submodule to read the station database from file

Parameters
  • fname (str) – File name

  • binp (bool) – Whether or not to use binary input

  • keys (List) – Default None If a list, then load database and select only keys that match those in this list. Returns the full db and a second optional output containing

Returns

stdb – Instance of StDbElement

Return type

StDbElement

stdb.io.write_db(fname=<class 'str'>, stdb={}, binp=True)

Submodule to write the station database to file

Parameters
  • fname (str) – File name

  • stdb (StDbElement) – Instance of StDbElement

  • binp (bool) – Whether or not to use binary output