epos-ai-picking-tools/README.md

167 lines
4.4 KiB
Markdown

# P and S Waves Detection with Deep Learning
## Installation
```
pip install --extra-index-url https://epos-apps.grid.cyfronet.pl/api/packages/epos-ai/pypi/simple epos_ai_picking_tools
```
## Generalized Phase Detection (GPD) Model
### Documentation
<!-- [[[cog
import cog
from epos_ai_picking_tools import cli_gpd as cli
from click.testing import CliRunner
runner = CliRunner()
result = runner.invoke(cli.cli, ["--help"])
help = result.output.replace("Usage: cli", "Usage: gpd_tool")
cog.out(
"```\n{}\n```".format(help)
)
]]] -->
```
Usage: gpd_tool [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
citation Prints citation of the model
list-pretrained Show pretrained model names
pick Detect phases in streams
version Prints version
```
<!-- [[[end]]] -->
### Pick
<!-- [[[cog
import cog
from epos_ai_picking_tools import cli_gpd as cli
from click.testing import CliRunner
runner = CliRunner()
result = runner.invoke(cli.cli, ["pick", "--help"])
help = result.output.replace("Usage: cli", "Usage: gpd_tool")
cog.out(
"```\n{}\n```".format(help)
)
]]] -->
```
Usage: gpd_tool pick [OPTIONS] [STREAM_FILE_NAMES]...
Detect phases in streams
Options:
-w, --weights TEXT for possible options see output of 'list-pretrained'
[default: original]
-o, --output PATH directory to store results [default: .]
-s, --stride INTEGER stride in samples for point prediction models
[default: 10]
-tp, --threshold-p FLOAT detection threshold for the P phase [default: 0.75]
-ts, --threshold-s FLOAT detection threshold for the S phase [default: 0.75]
--help Show this message and exit.
```
<!-- [[[end]]] -->
### Citation
<!-- [[[cog
import cog
from epos_ai_picking_tools import cli_gpd as cli
from click.testing import CliRunner
runner = CliRunner()
result = runner.invoke(cli.cli, ["citation"])
help = result.output.replace("Usage: cli", "Usage: gpd_tool")
cog.out(
"\n{}\n".format(help)
)
]]] -->
Ross, Z. E., Meier, M.-A., Hauksson, E., & Heaton, T. H. (2018). Generalized Seismic Phase Detection with Deep Learning. ArXiv:1805.01075 [Physics]. https://arxiv.org/abs/1805.01075
<!-- [[[end]]] -->
## PhaseNet
### Documentation
<!-- [[[cog
import cog
from epos_ai_picking_tools import cli_phasenet as cli
from click.testing import CliRunner
runner = CliRunner()
result = runner.invoke(cli.cli, ["--help"])
help = result.output.replace("Usage: cli", "Usage: phasenet_tool")
cog.out(
"```\n{}\n```".format(help)
)
]]] -->
```
Usage: phasenet_tool [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
citation Prints citation of the model
extras Downloads extra model weights from EPOS AI Platform
list-pretrained Show pretrained model names
pick Detect phases in streams
version Prints version
```
<!-- [[[end]]] -->
### Pick
<!-- [[[cog
import cog
from epos_ai_picking_tools import cli_phasenet as cli
from click.testing import CliRunner
runner = CliRunner()
result = runner.invoke(cli.cli, ["pick", "--help"])
help = result.output.replace("Usage: cli", "Usage: phasenet_tool")
cog.out(
"```\n{}\n```".format(help)
)
]]] -->
```
Usage: phasenet_tool pick [OPTIONS] [STREAM_FILE_NAMES]...
Detect phases in streams
Options:
-w, --weights TEXT for possible options see output of 'list-pretrained'
[default: original]
-o, --output PATH directory to store results [default: .]
-tp, --threshold-p FLOAT detection threshold for the P phase [default: 0.3]
-ts, --threshold-s FLOAT detection threshold for the S phase [default: 0.3]
-b, --blinding TUPLE number of prediction samples to discard on each side
of each window prediction [default: 0, 0]
--help Show this message and exit.
```
<!-- [[[end]]] -->
### Citation
<!-- [[[cog
import cog
from epos_ai_picking_tools import cli_phasenet as cli
from click.testing import CliRunner
runner = CliRunner()
result = runner.invoke(cli.cli, ["citation"])
help = result.output.replace("Usage: cli", "Usage: phasenet_tool")
cog.out(
"\n{}\n".format(help)
)
]]] -->
Zhu, W., & Beroza, G. C. (2019). PhaseNet: a deep-neural-network-based seismic arrival-time picking method. Geophysical Journal International, 216(1), 261-273. https://doi.org/10.1093/gji/ggy423
<!-- [[[end]]] -->