pyacs.gts.lib.format.pos module

Read and write GAMIT/GLOBK PBO pos files.

pyacs.gts.lib.format.pos.read_pos(self, tsdir='.', tsfile=None, xyz=True, verbose=False)[source]

Read GAMIT/GLOBK PBO pos file and load the time series into this Gts.

Parameters:
  • tsdir (str, optional) – Directory containing pos file(s). Default is ‘.’.

  • tsfile (str, optional) – Pos file to load. If None, a file CODE*.pos is sought. Default is None.

  • xyz (bool, optional) – If True, read XYZ and sx,sy,sz, corr columns. Default is True.

  • verbose (bool, optional) – If True, print progress. Default is False.

Returns:

self (data, code, X0, Y0, Z0, t0 populated).

Return type:

Gts

Notes

A pos file contains (almost) all needed info. If tsfile is None, read_pos looks for a file named CODE*.pos.

pyacs.gts.lib.format.pos.write_pos(self, idir='./pos', add_key='', force=None, verbose=False)[source]

Write time series in GAMIT/GLOBK PBO pos format.

Parameters:
  • idir (str, optional) – Output directory. Default is ‘./pos’.

  • add_key (str, optional) – If non-blank, output file is CODE_add_key.pos; otherwise CODE.pos.

  • force (str, optional) – ‘data’ or ‘data_xyz’ to force source; None for default behavior.

  • verbose (bool, optional) – If True, print progress. Default is False.

Returns:

self.

Return type:

Gts

Notes

Default (force=None): if both data and data_xyz exist, both are written; if only data, uses X0,Y0,Z0 to write data_xyz; if only data_xyz, recreates data and writes.