pisces.commands.sac2db#
Functions that support bulk conversion of SAC files to database tables.
- pisces.commands.sac2db.get_plugins(plugins)[source]#
Returns a list of imported plugin function objects from a list of plugin strings, like path/to/module_file:plugin_function .
- pisces.commands.sac2db.main(**kwargs)[source]#
Command-line arguments are created and parsed, fed to functions.
- Parameters:
- sessionSQLAlchemy.orm.Session instance
- tableslist
Canonical names for desired database tables.
- prefixstr
Target core tables using ‘account.prefix’ naming.
- absolute_pathsbool
- bbfkbool
Pull in deast & dnorth info from user7 & user8 header fields
- file_liststr
Name of a text file containing full SAC file names.
- fileslist
List of SAC file names.
- pisces.commands.sac2db.make_atomic(last, **rows)[source]#
Unify related table instances/row, including: ids, dir, and dfile
- Parameters:
- lastobspy.AttributeDict
{‘keyvalue’: lastid instance, …}
- rowsdict
{‘canonical tablename’: [list of row instances], …} of _related_ instances from a single SAC header?