scmagimport¶
Imports a foreign magnitude from a SCML event file into SeisComP.
Description¶
scmagimport imports a foreign Magnitude from a SCML Event file into SeisComP.
Processing steps performed:
Extract the preferred Origin and magnitude from the SCML event file.
Check if the foreign magnitude is of a specific type, e.g., M(USGS).
Use scevent to associate the origin to an SeisComP event. In this step the foreign origin is send via HTTP POST to the scevent REST API /api/1/try-to-associate which responds with an event ID if the association was successful.
Retrieve the event and the preferred origin from the local SeisComP system.
Copy the foreign magnitude to the preferred origin.
Send the magnitude copy via a notifier message to scmaster.
Let scevent decide whether the new magnitude becomes preferred.
Examples:
Read preferred origin and magnitude from SCML file
scmagimport -i /path/to/seiscomp_event.xml
Use xalan and a XSLT file to convert QuakeML file to SCML and pass it to the importer on stdin
xalan -in /path/to/quakeml_event.xml -xsl $SEISCOMP_ROOT/share/xml/0.14/quakeml__scml_0.14.xsl | scmagimport -i -
Command-Line Options¶
scmagimport [OPTIONS] source
Generic¶
- -h, --help¶
Show help message.
- -V, --version¶
Show version information.
- --config-file file¶
The alternative module configuration file. When this option is used, the module configuration is only read from the given file and no other configuration stage is considered. Therefore, all configuration including the definition of plugins must be contained in that file or given along with other command-line options such as --plugins.
- --plugins arg¶
Load given plugins.
- -D, --daemon¶
Run as daemon. This means the application will fork itself and doesn’t need to be started with &.
Verbosity¶
- --verbosity arg¶
Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug.
- -v, --v¶
Increase verbosity level (may be repeated, e.g., -vv).
- -q, --quiet¶
Quiet mode: no logging output.
- --print-component arg¶
For each log entry print the component right after the log level. By default the component output is enabled for file output but disabled for console output.
- --component arg¶
Limit the logging to a certain component. This option can be given more than once.
- -s, --syslog¶
Use syslog logging backend. The output usually goes to /var/lib/messages.
- -l, --lockfile arg¶
Path to lock file.
- --console arg¶
Send log output to stdout.
- --debug¶
Execute in debug mode. Equivalent to --verbosity=4 --console=1 .
- --trace¶
Execute in trace mode. Equivalent to --verbosity=4 --console=1 --print-component=1 --print-context=1 .
- --log-file arg¶
Use alternative log file.
Messaging¶
- -u, --user arg¶
Overrides configuration parameter
connection.username.
- -H, --host arg¶
Overrides configuration parameter
connection.server.
- -t, --timeout arg¶
Overrides configuration parameter
connection.timeout.
- -g, --primary-group arg¶
Overrides configuration parameter
connection.primaryGroup.
- -S, --subscribe-group arg¶
A group to subscribe to. This option can be given more than once.
- --start-stop-msg arg¶
Default:
0Set sending of a start and a stop message.
Database¶
- --db-driver-list¶
List all supported database drivers.
- -d, --database arg¶
The database connection string, format: service://user:pwd@host/database. "service" is the name of the database driver which can be queried with "--db-driver-list".
- --config-module arg¶
The config module to use.
- --inventory-db arg¶
Load the inventory from the given database or file, format: [service://]location .
- --db-disable¶
Do not use the database at all.
Processing¶
- -i, --input arg¶
Type: file
SeisComP XML file containing an event with a preferred origin and magnitude to import. Use ‘-’ to read from stdin instead of file.
- -a, --associate-api arg¶
Default:
http://localhost:18182/api/1/try-to-associateType: string
scevent API URL for event association.
- --mag-type arg¶
Default:
M(USGS)Type: string
Magnitude type to use for the imported magnitude.