earthscopestraintools.gtsm_metadata module

class earthscopestraintools.gtsm_metadata.GtsmMetadata(network, station, gauge_weights=None)

Bases: object

Class for loading and storing GTSM processing metadata for a given station. Metadata sources include a summary table

https://www.unavco.org/data/strain-seismic/bsm-data/lib/docs/bsm_metadata.txt

and individual station pages ie

http://bsm.unavco.org/bsm/level2/B001/B001.README.txt

Parameters:
  • network (str) – 2 character FDSN network code

  • station (str) – 4 character FDSN station code

  • gauge_weights (list, optional) – optional list of ‘good’ channels, where 1 is good and 0 is bad, defaults to [1, 1, 1, 1]

Variables:
  • network – str

  • station – str

  • latitude – float

  • longitude – float

  • elevation – float

  • gap – float, instrument gap in meters

  • diameter – float, instrument sensing diameter in meters

  • start_date – str, formatted as “%Y-%m-%d”

  • orientation – float, degrees East of North for CH0

  • reference_strains – dict, containing ‘linear_date’:’YYYY:DOY’ and each channel ie ‘CH0’:reference counts

  • strain_matrices – dict, contains one or more calibration matrices, keyed to the name of the calibration.

  • atmp_response – dict, reponse coefficients for each channel

  • tidal_params – dict, keys are tuple of (channel, tidal constituent, phz/amp/doodson)

get_atmp_response()

Parse atmospheric pressure response from station processing metadata

Returns:

atmospheric response coefficients in microstrain/hPa

Return type:

dict

get_ch_prelim_strain_matrix()

parse CH preliminary strain matrix from station metadata if available. Calibrations of TABOO-STAR stations performed by Cassie Hanagan in 2022.

Returns:

CH_PRELIM calibration matrix

Return type:

np.array

get_elevation()

parse elevation from metadata table

Returns:

station elevation

Return type:

float

get_er2010_strain_matrix()

parse ER2010 strain matrix from station metadata if available. From Roeloffs, E. (2010), Tidal calibration of Plate Boundary Observatory borehole strainmeters: Roles of vertical and shear coupling , J. Geophys. Res., 115, B06405, doi:10.1029/2009JB006407

Returns:

ER2010 calibration matrix

Return type:

np.array

get_event_terms()

Loads site and longitude terms for a particular strainmeter using Barbour et al 2021. These terms are used for event magnitude estimation.

get_gap()

parse instrument gap from metadata table

Returns:

station instument gap in meters

Return type:

float

get_lab_strain_matrix()

parse lab strain matrix from station metadata

Returns:

lab calibration matrix

Return type:

np.array

get_latitude()

parse latitude from metadata table

Returns:

station latitude

Return type:

float

get_longitude()

parse longitude from metadata table

Returns:

station longitude

Return type:

float

get_meta_table()

loads summary metadata table into dataframe

Returns:

basic metadata for all strainmeter stations

Return type:

pandas.DataFrame

get_orientation()

parse instrument orientation from metadata table

Returns:

orientation of CH0 in degrees East of North

Return type:

float

get_reference_strains()

Parse reference strains from metadata

Returns:

reference strains

Return type:

dict

get_start_date()

parse data start date from metadata table

Returns:

start date string as “%Y-%m-%d”

Return type:

str

get_tidal_params()

Parse tidal params from station processing metadata

Returns:

tidal coefficients

Return type:

dict

load_site_terms()

Read site terms from file

make_weighted_strain_matrix(gauge_weights=[1, 1, 1, 1])

calculates lab strain matrix, and allows exclusion of a single gauge

Parameters:

gauge_weights (list, optional) – which gauges to use, set to 0 to exclude one gauge, defaults to [1, 1, 1, 1]

Returns:

lab calibration matrix

Return type:

numpy.array

show()

print metadata

earthscopestraintools.gtsm_metadata.fdsn2bottlename(channel)

convert FDSN channel into bottlename

Parameters:

channel (str) – FDSN channel code

Returns:

bottlename

Return type:

str

earthscopestraintools.gtsm_metadata.get_fdsn_network(station)

Get FDSN network name from station fourcharid using es-datasources-api

Parameters:

station (string) – station four character id

Returns:

2 char FDSN network code for station

Return type:

string

earthscopestraintools.gtsm_metadata.get_metadata_df()

Function loads strainmeter metadata into pandas dataframe

Returns:

bsm metadata

Return type:

pandas.DataFrame