pisces.io.mseed#

Support for mapping miniSEED data into database tables.

pisces.io.mseed.mseedhdr2tables(stats, wfdisc=None, site=None, sitechan=None, affiliation=None)[source]#

Scrapes an ObsPy Stats header instance into various database table rows.

If table classes are provided, filled class instances are returned, otherwise dicts are returned.

Parameters:
statsobspy.core.Stats instance
wfdisc, site, sitechan, affiliationSQLAlchemy ORM table classes
Returns:
rowsdict

Keys are canonical table names, values are lists of dicts or class instances.

Notes

wfdisc.datatype is set to ‘sd’, which is not an actual KB Core or CSS 3.0 datatype, but is supported within Pisces, and does not require data reformating/copying.