The qml2nllphs.py code is included into the present docker.
The docker is used to parse a full QuakeML (xml) file containing information on hypocenter and related arrival times picks, and convert all to NonLinLoc standard phase input file.
The following line is taken from the example output:
#Station_name Instrument Component P_phase_onset Phase_descriptor First_motion Date Hour_minute Seconds Err_type Err Err_mag Coda_duration Amplitude Period
MTRZ IV HNZ ? Sn ? 20210211 0619 41.3500 QUAL 4 -1.00E+00 -1.00E+00 -1.00E+00
Note:
- In the present version no information on Coda_duration Amplitude Period is included in the output.
- the Err_type is "QUAL" so the Err_mag is expressed as discrete Hypoinverse-like weight
- One reading one line
- To include network information we used Instrument field as "network" record and "Component" field for Instrument+Component, that is fully compatible with NLL
The source code has a specific usage to which the docker has its simplified interface, so the user does not need to know it.
Anyway, only for information completeness here it is:
usage: qml2nllphs.py [-h] [--qmlin QMLIN] [--eventid EVENTID] [--version VERSION] [--conf CONF] [--agency AGENCY]
optional arguments:
-h, --help show this help message and exit
--qmlin QMLIN Full path to qml event file
--eventid EVENTID INGV event id
--version VERSION Agency coding origin version type (default: preferred) preferred,all, or an integer for known version numbers
--conf CONF needed with --eventid agency webservices routes list type (default: ./ws_agency_route.conf)
--agency AGENCY needed with --eventid agency to query for (see routes list in .conf file) type (default: ingv)
To obtain qml2nllphs docker image, you have two options:
Get the last built image from DockerHub repository:
$ docker pull ingv/qml2nllphs
First, clone the git repository
$ git clone https://github.com/INGV/qml2nllphs.git
$ cd qml2nllphs
$ docker build --tag ingv/qml2nllphs .
in case of errors, try:
$ docker build --no-cache --pull --tag ingv/qml2nllphs .
To run the container, use the command below; the -v
option is used to "mount" working directory into container:
$ docker run --rm --user $(id -u):$(id -g) -v $(pwd)/example:/opt/input ingv/qml2nllphs
example:
$ docker run --rm --user $(id -u):$(id -g) -v $(pwd)/example:/opt/input ingv/qml2nllphs --qmlin /opt/input/quakeml.xml
To override the ENTRYPOINT
directive and enter into the Docker container, run:
$ docker run --rm -it --user $(id -u):$(id -g) --entrypoint=bash qml2nllphs
Get last Docker image from DockerHub repository:
$ docker pull ingv/qml2nllphs
Thanks to your contributions!
Here is a list of users who already contributed to this repository:
(c) 2021 Raffaele Distefano raffaele.distefano[at]ingv.it
(c) 2021 Valentino Lauciani valentino.lauciani[at]ingv.it
Istituto Nazionale di Geofisica e Vulcanologia, Italia