earthscopestraintools.ascii_tools module
- earthscopestraintools.ascii_tools.download_l2_ascii(station: str, start: str, end: str)
method to download level 2 ascii tar files from EarthScope. Untars into a folder and deletes the tarball.
- Parameters:
station (str) – Four character station id
start (str) – start time of date range
end (str) – end time of desired date range
- earthscopestraintools.ascii_tools.load_l2_ascii(station, start, end, strain_type='gauge', show_stats=False, download=True, remove=True)
method to download level 2 ascii strain data for a given date range and read into Timeseries objects. Returns a dictionary of Timeseries keyed as ‘microstrain’, ‘offset_c’, ‘tide_c’, ‘trend_c’, ‘atmp_c’, and ‘atmp’
- Parameters:
station (str) – Four character station id
start (str) – start time of date range
end (str) – end time of desired date range
strain_type (str, optional) – whether to load ‘gauge’ or ‘regional’ strains, defaults to ‘gauge’
show_stats (bool, optional) – option to print gap analysis during loading, defaults to False
download (bool, optional) – option to download the ascii files, use False if already have files in working directory, defaults to True
remove (bool, optional) – option to delete the ascii files after loading, defaults to True
- Returns:
a dictionary containing 6 Timeseries objects. microstrain, 4 corrections, and atmp (pressure)
- Return type:
dict of Timeseries
- earthscopestraintools.ascii_tools.read_l2_ascii(station: str, year: str, strain_type='gauge', show_stats=True)
method that reads a single year of l2 data from disk into a dictionary of Timeseries
- Parameters:
station (str) – Four character station id
year (str) – Four character year YYYY
strain_type (str, optional) – whether to load ‘gauge’ or ‘regional’ strains, defaults to ‘gauge’
show_stats (bool, optional) – option to print gap analysis during loading, defaults to True
- Returns:
a dictionary containing 6 Timeseries objects. microstrain, 4 corrections, and atmp (pressure)
- Return type:
dict of Timeseries
- earthscopestraintools.ascii_tools.remove_l2_ascii(station: str, start: str, end: str)
method to delete level 2 ascii folders from disk. .
- Parameters:
station (str) – Four character station id
start (str) – start time of date range
end (str) – end time of desired date range