Skip to content

Commit 946087a

Browse files
committed
docs: completed Model Configuration section,
1 parent 3f564ef commit 946087a

File tree

5 files changed

+438
-25
lines changed

5 files changed

+438
-25
lines changed

docs/guide/experiment_config.rst

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1+
.. _experiment_config:
2+
13
Experiment Configuration
24
========================
35

4-
**floatCSEP** provides a standardized workflow for forecasting experiments, whose instructions can be set in a configuration file. Here, we need to define the Experiments' temporal settings, geographic region, seismic catalogs, forecasting models, evaluation tests and post-process.
6+
**floatCSEP** provides a standardized workflow for forecasting experiments, the instructions of which can be set in a configuration file. Here, we need to define the Experiments' temporal settings, geographic region, seismic catalogs, forecasting models, evaluation tests and any post-process options.
57

68

79
Configuration Structure
810
-----------------------
9-
Configuration files are written in ``YAML`` format and is divided into different aspects of the Experiment setup:
11+
Configuration files are written in ``YAML`` format and are divided into different aspects of the experiment setup:
1012

11-
1. **Experiment Metadata**: Experiment's information such as its ``name``, ``authors``, ``doi``, ``URL``, etc.
13+
1. **Metadata**: Experiment's information such as its ``name``, ``authors``, ``doi``, ``URL``, etc.
1214
2. **Temporal Configuration** (``time_config``): Temporal characteristics of the experiment, such as the start and end dates, experiment class (time-independent or time-dependent), the testing intervals, etc.
13-
3. **Spatial and Magnitude Configuration** (``region_config``): Describes testing region, such as its geographic bounds, magnitude ranges, and depth ranges.
15+
3. **Spatial and Magnitude Configuration** (``region_config``): Describes the testing region, such as its geographic bounds, magnitude ranges, and depth ranges.
1416
4. **Seismic Catalog** (``catalog``): Defines the seismicity data source to test the models. It can either link to a seismic network API, or an existing file in the system.
1517
5. **Models** (``models``): Configuration of forecasting models. It can direct to an additional configuration file with ``model_config`` for readability. See :ref:`model_config`.
1618
6. **Evaluation Tests** (``tests``): Configuration of the statistical tests to evaluate the models. It can direct to an additional configuration file with ``test_config`` for readability. See :ref:`evaluation_config`.
1719
7. **Postprocessing** (``postprocess``): Instructions on how to process and visualize the experiment's results, such as plotting forecasts or generating reports. See :ref:`postprocess`.
1820

1921
.. note::
2022

21-
YAML (Yet Another Markup Language) is a human-readable format used for configuration files. It uses **key: value** pairs to define settings, and indentation to represent nested structures. Lists are denoted by hyphens (`-`).
23+
`YAML` (Yet Another Markup Language) is a human-readable format used for configuration files. It uses **key: value** pairs to define settings, and indentation to represent nested structures. Lists are denoted by hyphens (`-`).
2224

2325

2426
**Example Basic Configuration** (``config.yml``):
@@ -74,7 +76,7 @@ Any non-parsed parameter (e.g., not specified in the documentation) will be stor
7476
Temporal Definition
7577
-------------------
7678

77-
Configuring the temporal definition of the experiment is indicated with the ``time_config`` option, followed by an indented block of admissible parameters. The purpose of this configuration section is to set a testing **time-window**, or a sequence of **time-windows**. Each time-window is then defined by ``datetime`` strings representing its lower and upper edges.
79+
Configuring the experiment temporal definition is indicated with the ``time_config`` option, followed by an indented block of admissible parameters. The purpose of this configuration section is to set a testing **time-window**, or a sequence of **time-windows**. Each time-window is defined by two ``datetime`` strings representing its lower and upper edges.
7880

7981
Time-windows can be defined from different combination of the following parameters:
8082

@@ -86,13 +88,13 @@ Time-windows can be defined from different combination of the following paramete
8688
* - **end_date**
8789
- The end date of the experiment in UTC and ISO8601 format (``%Y-%m-%dT%H:%M:%S``)
8890
* - **intervals**
89-
- An integer amount of testing intervals (time windows).
91+
- An integer amount of testing intervals (time windows). If **horizon** is given, each time-window has a length equal to **horizon**. Else, the range between **start_date** and **end_date** is equally divided into the amount of **intervals**.
9092
* - **horizon**
9193
- Indicates the time windows `length`. It is written as a number, followed by a hyphen (`-`) and a time unit (``days``, ``weeks``, ``months``, ``years``). e.g.: ``1-days``, ``2.5-years``.
92-
* - **offset**
93-
- Offset between consecutive time-windows. If none given or ``offset=horizon``, time-windows are non-overlapping. It is written as a number, followed by a hyphen (`-`) and a time unit (``days``, ``weeks``, ``months``, ``years``). e.g.: ``1-days``, ``2.5-years``.
9494
* - **growth**
9595
- How to discretize the time-windows between ``start_date`` and ``end_date``. Options are: **incremental** (The end of a time window matches the beginning of the next) or **cumulative** (All time-windows have a start at the experiment ``start_date``).
96+
* - **offset**
97+
- Offset between consecutive time-windows. If none given or ``offset=horizon``, time-windows are non-overlapping. It is written as a number, followed by a hyphen (`-`) and a time unit (``days``, ``weeks``, ``months``, ``years``). e.g.: ``1-days``, ``2.5-years``.
9698
* - **exp_class**
9799
- Experiment temporal class. Options are:
98100
**ti** (default): Time-Independent; **td**: Time-Dependent.
@@ -151,7 +153,7 @@ Some example of parameter combinations:
151153
| exp_class: td | |
152154
+------------------------------------------------+----------------------------------------------------------+
153155

154-
Alternatively, time windows can be defined explicitly as a **list** of timewindow (which are a **list** of ``datetimes``):
156+
Alternatively, time windows can be defined explicitly as a **list** of time-windows (each of which is a **list** of ``datetimes``):
155157

156158
.. code-block:: yaml
157159
@@ -165,7 +167,7 @@ Alternatively, time windows can be defined explicitly as a **list** of timewindo
165167
Spatial and Magnitude Definition
166168
--------------------------------
167169

168-
Configuring the spatial and magnitude definitions is done through the ``region_config`` option, followed by an indented block of admissible parameters. Here, we need to define the spatial region (check the `Region <https://docs.cseptesting.org/concepts/regions.html>`_ concept from **pyCSEP**), the magnitude `bins` (i.e., discretization) and the `depth` extent (used mostly to filter out seismicity outside this range):
170+
Configuring the spatial and magnitude definitions is done through the ``region_config`` option, followed by an indented block of admissible parameters. Here, we need to define the spatial region (check the `Region <https://docs.cseptesting.org/concepts/regions.html>`_ documentation from **pyCSEP**), the magnitude `bins` (i.e., discretization) and the `depth` extent.
169171

170172
.. list-table::
171173
:widths: 20 80
@@ -177,7 +179,7 @@ Configuring the spatial and magnitude definitions is done through the ``region_c
177179
* - **mag_max**
178180
- The maximum magnitude of the experiment.
179181
* - **mag_bin**
180-
- The size of a magnitude bin.
182+
- The size of the magnitude bin.
181183
* - **depth_min**
182184
- The minimum depth (in `km`) of the experiment.
183185
* - **depth_max**
@@ -187,15 +189,22 @@ Configuring the spatial and magnitude definitions is done through the ``region_c
187189
1. The ``region`` parameter can be defined from:
188190

189191

190-
* A **CSEP** region: This correspond to pre-established testing regions for highly seismic areas. This parameter is linked to **pyCSEP** functions, and can be either ``italy_csep_region``, ``nz_csep_region``, ``california_relm_region`` or ``global_region``.
191-
* A `txt` file with the spatial cells collection , where each cell is defined by its origin (e.g., the x (lon) and y (lat) of the lower-left corner). See the **pyCSEP** `documentation <https://docs.cseptesting.org/concepts/regions.html#cartesian-grid>`_ on Regions, the class :class:`~csep.core.regions.CartesianGrid2D` and its method :meth:`~csep.core.regions.CartesianGrid2D.from_origins`. For example, for a region consisting of three cells, their origins can be written as:
192+
* A **CSEP** region: They correspond to pre-established testing regions for seismic areas. This parameter is linked to **pyCSEP** functions, and can be one of the following values:
193+
194+
* ``italy_csep_region``
195+
* ``nz_csep_region``
196+
* ``california_relm_region``
197+
* ``global_region``.
198+
199+
* A text file with the spatial cells collection. Each cell is defined by its origin (e.g., the x (lon) and y (lat) of the lower-left corner). For example, for a region consisting of three cells, their origins can be written as:
192200

193201
.. code-block::
194202
195203
10.0 40.0
196204
10.0 40.1
197205
10.1 40.0
198206
207+
See the **pyCSEP** `Region documentation <https://docs.cseptesting.org/concepts/regions.html#cartesian-grid>`_, the class :class:`~csep.core.regions.CartesianGrid2D` and its method :meth:`~csep.core.regions.CartesianGrid2D.from_origins` for more info.
199208
2. Magnitude definition: We need to define a magnitude discretization or `bins`. The parameters **mag_min**, **mag_max**, **mag_bin** allows to create an uniformly distributed set of bins. For example, the command:
200209

201210
.. code-block:: yaml
@@ -204,7 +213,7 @@ Configuring the spatial and magnitude definitions is done through the ``region_c
204213
mag_max: 5.0
205214
mag_bin: 0.5
206215
207-
would result in two magnitude bins with ranges ``[4.0, 4.5)`` and ``[4.5, 5.0)``. Alternatively, magnitudes can be written explicitly by their bin edges. For example:
216+
would result in two magnitude bins with ranges ``[4.0, 4.5)`` and ``[4.5, 5.0)``. Alternatively, magnitudes can be written explicitly by their bin `left` edge. For example:
208217

209218
.. code-block:: yaml
210219
@@ -213,7 +222,8 @@ Configuring the spatial and magnitude definitions is done through the ``region_c
213222
- 4.1
214223
- 4.2
215224
216-
resulting in the ``[4.0, 4.1)`` and ``[4.1, 4.2)``
225+
resulting in the ``[4.0, 4.1)``, ``[4.1, 4.2)`` and ``[4.2, 4.3)``.
226+
217227

218228
3. Depths: The minimum and maximum depths are just required to filter out seismicity outside those ranges.
219229

@@ -253,8 +263,8 @@ The seismicity catalog can be defined with the ``catalog`` parameter. It represe
253263

254264
**floatCSEP** can retrieve the catalog from a seismic network API. The possible options are:
255265

256-
- ``query_gcmt``: Global Centroid Moment Tensor Catalog (https://www.globalcmt.org/) - via the API of the ISC (https://www.isc.ac.uk/)
257-
- ``query_comcat``: ANSS Comprehensive Earthquake Catalog ComCat (https://earthquake.usgs.gov/data/comcat/)
266+
- ``query_gcmt``: Global Centroid Moment Tensor Catalog (https://www.globalcmt.org/), obtained via ISC (https://www.isc.ac.uk/)
267+
- ``query_comcat``: ANSS ComCat (https://earthquake.usgs.gov/data/comcat/)
258268
- ``query_bsi``: Bollettino Sismico Italiano (https://bsi.ingv.it/)
259269
- ``query_gns``: GNS GeoNet New Zealand Catalog (https://www.geonet.org.nz/)
260270

0 commit comments

Comments
 (0)