pyacs.gts.lib.format.cats module
Read and write time series files in the CATS format.
- pyacs.gts.lib.format.cats.read_cats_file(self, idir='.', ifile=None, gmt=True, verbose=False)[source]
Read a CATS file and load the time series into this Gts.
- Parameters:
idir (str, optional) – Directory for CATS files.
ifile (str, optional) – Path to CATS file. If None, uses idir/cats_<code>.dat.
gmt (bool or str, optional) – If True, read lon/lat from ../maps_en_velo.gmt; if str, path to GMT file.
verbose (bool, optional) – Verbose mode.
- Returns:
self (data loaded from file).
- Return type:
- pyacs.gts.lib.format.cats.write_cats(self, idir='./cats', offsets_dates=None, add_key='')[source]
Write a file for CATS analysis.
If offsets_dates is not None, offset date information is added at the beginning.
- Parameters:
idir (str, optional) – Directory to save the file (default ‘./cats’).
offsets_dates (list, optional) – List of offset dates to write in the header.
add_key (str, optional) – Additional key in the file name (e.g. cats_<code>_<add_key>.dat).
- Return type:
None