pyacs.gts.lib.metadata module

pyacs.gts.lib.metadata.info(self, info=2)[source]

Print various informations about the time series

pyacs.gts.lib.metadata.make_dynamic_apr(self, apr, time_step=30.0, pos_tol=0.03, dates=[], gap=20.0, verbose=False)[source]

Create a dynamic apr file for GAMIT (coordinates at different times, no velocity).

Parameters:
  • apr (str) – Output apr file path (globk format).

  • time_step (float, optional) – Time step for writing dates in days. Default is 30.

  • pos_tol (float, optional) – Position tolerance (m); exceedance triggers a new date. Default is 0.03.

  • dates (list, optional) – Decimal-year dates where writing is forced. Default is [].

  • gap (float, optional) – Gap in days; if no data for longer than gap, observation is forced and tested against pos_tol. Default is 20.

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

Returns:

self.

Return type:

Gts

pyacs.gts.lib.metadata.read_eq_rename(self, eq_rename, in_place=False, verbose=False)[source]

Read current site info from a globk eq_rename file.

Populates outliers and offsets_dates; excluded periods from the file are added to outliers.

Parameters:
  • eq_rename (str) – Path to eq_rename file (globk format).

  • in_place (bool, optional) – If True, modify self; if False, return a new Gts. Default is False.

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

Returns:

self (if in_place) or new Gts instance.

Return type:

Gts

pyacs.gts.lib.metadata.read_lon_lat(self, gmt_file, verbose=False)[source]

Read a GMT psvelo file and set Gts.lon and Gts.lat.

Parameters:
  • gmt_file (str) – Path to GMT psvelo file.

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

Returns:

self (lon, lat populated).

Return type:

Gts

pyacs.gts.lib.metadata.read_offset_dates(self, offset_file)[source]

Read an offset file and set offsets_dates (pyacs format).

File format: code and dates; dates parsed by pyacs.guess_date.

Parameters:

offset_file (str) – Path to offset file.

Returns:

self (offsets_dates populated).

Return type:

Gts

pyacs.gts.lib.metadata.save_apr(self, apr, epoch=None, verbose=False, excluded_periods=None)[source]

Save Gts analysis results to a globk-format apr file.

Parameters:
  • apr (str) – Output apr file path (globk format).

  • epoch (float, optional) – Epoch in decimal year for coordinates. Default is None (use period mid).

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

  • excluded_periods (list, optional) – Periods to exclude. Default is None.

Returns:

self.

Return type:

Gts

Notes

Following globk convention, site names are XXXX_1PS, XXXX_2PS, etc. between offset dates.

pyacs.gts.lib.metadata.save_eq_rename(self, eq_rename, verbose=False, excluded_periods=None)[source]

Save Gts analysis results to a globk-format eq_rename file.

Parameters:
  • eq_rename (str) – Output eq_rename file path (globk format).

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

  • excluded_periods (list, optional) – Periods to exclude. Default is None.

Returns:

self.

Return type:

Gts

pyacs.gts.lib.metadata.save_offsets(self, ofile, verbose=True, comment='', up=False, info=False)[source]

Append offset values to a text file (GMT psvelo format).

Parameters:
  • ofile (str) – Output offset file path.

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

  • comment (str, optional) – Comment; ‘#’ is prepended if not present. Default is ‘’.

  • up (bool, optional) – If True, Ve/SVe/SVen set to 0 and Vu as 4th/6th fields. Default is False.

  • info (bool, optional) – If True, write extra info. Default is False.

Returns:

self.

Return type:

Gts

pyacs.gts.lib.metadata.save_velocity(self, gmt_file, verbose=True, comment=None, up=False)[source]

Append velocity estimates (with uncertainties) to a GMT psvelo file.

Parameters:
  • gmt_file (str) – Output GMT psvelo file (appended if it exists).

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

  • comment (str, optional) – Comment line; ‘#’ is prepended if not present.

  • up (bool, optional) – If True, Ve/SVe/SVen set to 0 and Vu written as 4th/6th fields. Default is False.

Returns:

self.

Return type:

Gts