FDSN — API reference#
FDSN seismic-event data source subpackage — earthlens.fdsn.
Background and usage are covered under the other pages in this section
(Introduction, Usage); this page is the
rendered API.
earthlens.fdsn
#
FDSN seismic-event backend.
Thin wrapper over obspy.clients.fdsn that queries the IRIS
FDSN-event web service across six seismological networks — USGS
(ComCat), EMSC (seismicportal), INGV (Italian seismic + volcano),
EarthScope (ex-IRIS DMC), ISC (global reviewed bulletin), and GeoNet
(New Zealand) — and returns the matched events as a pyramids
:class:~pyramids.feature.collection.FeatureCollection of point
features (CRS EPSG:4326).
This is the package's first vector backend: the result is a table of
events, not a gridded array, so :data:FDSN.OUTPUT_KIND is
"vector" and an aggregate= argument is refused — by the shared
guard in :class:earthlens.base.AbstractDataSource, so a direct
FDSN(...).download(aggregate=...) is rejected identically to one
made through the :class:earthlens.earthlens.EarthLens facade.
Provider selection: for this backend variables is a list[str] of
network keys — variables=["USGS"], variables=["USGS", "EMSC"] —
not data-variable names. This is an intentional, documented
overload (the facade makes variables a required argument, so an
extra providers= kwarg would only add placeholder noise). Query
filters (min_magnitude, max_depth, event_type, …) arrive as
explicit :class:FDSN constructor keyword arguments.
Public surface (re-exported from this package):
- :class:
FDSN— the backend; instantiate with a date range, a bbox, andvariables=[network, ...], then call :meth:FDSN.download. - :class:
Catalog— pydantic-backed loader for the bundledfdsn_data_catalog.yamlprovider dispatch table. - :class:
Provider— one network's dispatch row (fdsn_id, title,needs_token, default min-magnitude, docs URL). - :func:
catalog_to_fc/ :func:empty_fc— theobspy.Catalog→ FeatureCollection mapper and its empty-result counterpart. - :func:
resolve_earthscope_token— optional EarthScope-token resolver (env / file); the public event services need no token. - :data:
SHAKEMAP_LAYERS/ :data:DEFAULT_SHAKEMAP_LAYERS— the fourteen ShakeMap gridswith_shakemap=Truecan write, and the one written by default. - :data:
CATALOG_PATH— path to the bundled provider YAML.
Examples:
-
List the registered networks:
Catalog
#
Bases: AbstractCatalog
Provider catalog for the FDSN seismic-event backend.
Reads the bundled fdsn_data_catalog.yaml (shipped as package
data) and exposes its providers: block as a map of
:class:Provider rows. Instantiate with no arguments
(Catalog()); :func:model_post_init loads and validates the YAML
(cached) in one pass.
The rows live in the framework's :attr:datasets field so the
inherited dict-like surface behaves like every other backend's
catalog — len(cat), name in cat, cat[name], iter(cat) and
:meth:get_dataset all work. The same rows are mirrored onto
:attr:providers, so the domain-friendly :meth:get_provider and
cat.providers work too; the two are aliases of one another.
Attributes:
| Name | Type | Description |
|---|---|---|
datasets |
dict[str, Provider]
|
Map from the user-facing network name to its
:class: |
providers |
dict[str, Provider]
|
Alias of :attr: |
Examples:
- The dict-like surface works like the other backends:
datasetsandprovidersare the same rows; resolve via either accessor:- An unknown network raises with a did-you-mean hint:
Source code in libs/providers/hazards/src/earthlens/fdsn/catalog.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | |
get_catalog()
#
Return the network map (satisfies the abstract contract).
Returns:
| Type | Description |
|---|---|
dict[str, Provider]
|
dict[str, Provider]: Same object as :attr: |
load(catalog_path=None)
classmethod
#
Read the FDSN provider catalog from disk (cached).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog_path
|
Path | None
|
Path to the catalog YAML. Defaults to the
module-level :data: |
None
|
Returns:
| Type | Description |
|---|---|
Catalog
|
A fully-populated :class: |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the file has no |
Source code in libs/providers/hazards/src/earthlens/fdsn/catalog.py
model_post_init(__context)
#
Auto-load the bundled catalog and keep datasets/providers in sync.
Catalog() with no args reads :data:CATALOG_PATH (cached).
Passing either datasets=... or providers=... skips the disk
read (used in tests); whichever was supplied is mirrored onto
the other so both accessors stay consistent.
Raises:
| Type | Description |
|---|---|
ValueError
|
Propagated from :func: |
Source code in libs/providers/hazards/src/earthlens/fdsn/catalog.py
FDSN
#
Bases: AbstractDataSource
FDSN seismic-event backend (vector point-feature output).
Wraps obspy.clients.fdsn.Client.get_events so a user can pull a
space/time/magnitude window of seismic events from one or more
FDSN networks through the same download() shape every other
earthlens backend uses. Each network key in variables becomes
one server-side query; the per-network catalog is mapped to a
:class:~pyramids.feature.collection.FeatureCollection and the
networks' results are unioned into the single FeatureCollection
download() returns.
The public event services need no credentials; the optional
EarthScope token is resolved lazily and only used for a provider
whose catalog row declares needs_token: true.
Attributes:
| Name | Type | Description |
|---|---|---|
OUTPUT_KIND |
OutputKind
|
|
Examples:
- Build a plain event query and inspect what it resolved:
>>> from earthlens.fdsn import FDSN >>> backend = FDSN( ... start="2024-01-01", ... end="2024-01-31", ... variables=["USGS"], ... lat_lim=[30.0, 45.0], ... lon_lim=[130.0, 145.0], ... ) >>> backend.vars ['USGS'] >>> backend.time.resolution 'all' >>> backend.space.south, backend.space.east (30.0, 145.0) - An empty network list falls back to USGS, and the products the query will issue carry the resolved obspy client id:
- Asking for the ShakeMap side-output selects one grid by default and leaves the returned shape a vector table:
Source code in libs/providers/hazards/src/earthlens/fdsn/backend.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 | |
__init__(start, end, variables, lat_lim, lon_lim, temporal_resolution='all', path=None, fmt='%Y-%m-%d', min_magnitude=None, max_magnitude=None, min_depth=None, max_depth=None, magnitude_type=None, event_type=None, orderby='time', limit=None, earthscope_token=None, file_format='gpkg', with_shakemap=False, shakemap_layers=None, max_shakemap_events=_DEFAULT_MAX_SHAKEMAP_EVENTS)
#
Initialise an FDSN backend instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
str
|
Inclusive start of the event window, as a string
parsed with |
required |
end
|
str
|
Inclusive end of the event window. |
required |
variables
|
list[str]
|
List of FDSN network keys to query ( |
required |
lat_lim
|
list[float]
|
|
required |
lon_lim
|
list[float]
|
|
required |
temporal_resolution
|
str
|
FDSN does not chunk by day/month — the
whole |
'all'
|
path
|
Path | str | None
|
Output directory for the per-network vector files. Created by the parent class if absent. |
None
|
fmt
|
str
|
|
'%Y-%m-%d'
|
min_magnitude
|
float | None
|
Lower magnitude bound. |
None
|
max_magnitude
|
float | None
|
Upper magnitude bound, or |
None
|
min_depth
|
float | None
|
Lower depth bound in kilometres, or |
None
|
max_depth
|
float | None
|
Upper depth bound in kilometres, or |
None
|
magnitude_type
|
str | None
|
Restrict to a magnitude type (e.g.
|
None
|
event_type
|
str | None
|
Restrict to an event type (e.g.
|
None
|
orderby
|
str
|
Result ordering — |
'time'
|
limit
|
int | None
|
Maximum number of events per network, or |
None
|
earthscope_token
|
str | None
|
Optional EarthScope access token; falls
back to |
None
|
file_format
|
FileFormat
|
Output vector format — |
'gpkg'
|
with_shakemap
|
bool
|
Also fetch each event's gridded ShakeMap and
write it as a GeoTIFF under |
False
|
max_shakemap_events
|
int
|
Ceiling on how many events one call
will fetch a ShakeMap for, guarding against a broad
query quietly pulling gigabytes (each event is a
separate request plus a multi-megabyte archive). Events past
the ceiling are deferred with a warning naming the
count — never silently. The ceiling counts fetches,
not events: an event already satisfied on disk costs no
budget, and an id that can never be fetched at all is
dropped before counting. So re-running the same request
takes the next batch, and repeating it eventually walks
the whole list. The one exception is an event that fails
on every attempt: a failure is not cached, so it is
retried each run and keeps its place in the queue.
Within a run the events kept are the first
|
_DEFAULT_MAX_SHAKEMAP_EVENTS
|
shakemap_layers
|
list[str] | None
|
Which ShakeMap grids to write when
|
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
TypeError
|
If |
Source code in libs/providers/hazards/src/earthlens/fdsn/backend.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | |
download(progress_bar=True, errors='warn', limit=None, force=False)
#
Query every requested network and return the unioned events.
Each network in self.vars is queried once; its events are
written to one vector file under path (named after the
network), and the per-network results are concatenated into the
single :class:FeatureCollection returned. A network that
errors is logged and skipped (its events are simply absent from
the union) rather than aborting the whole request; only a total
failure — every network errored — raises. An all-empty result
(every network matched nothing) returns a schema-correct empty
FeatureCollection and writes nothing.
When the instance was built with with_shakemap=True, each USGS
event additionally gets its ShakeMap grids written as GeoTIFFs
under path/shakemap/<event>/. Those rasters are a side effect
only — the return value stays the event FeatureCollection. An
event whose ShakeMap cannot be fetched is logged and skipped
under the same errors= policy as a failed network, so one
missing grid never costs the event table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
progress_bar
|
bool
|
Whether to show a progress bar. obspy's
|
True
|
errors
|
str
|
Partial-failure policy, applied to both the
per-network query loop and the per-event ShakeMap loop.
|
'warn'
|
force
|
bool
|
Refetch a ShakeMap whose GeoTIFFs are already on
disk instead of reusing them. A |
False
|
limit
|
int | None
|
Maximum events per network, overriding the constructor's
|
None
|
Returns:
| Name | Type | Description |
|---|---|---|
FeatureCollection |
FeatureCollection
|
The row-wise union of every requested
network's events, CRS |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If every requested network's query failed
(propagated from :meth: |
Source code in libs/providers/hazards/src/earthlens/fdsn/backend.py
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | |
Provider
#
Bases: BaseModel
One FDSN-event network's dispatch row.
The user-facing name is the parent key in
:attr:Catalog.providers (and :attr:Catalog.datasets) and is not
stored on the row.
Attributes:
| Name | Type | Description |
|---|---|---|
fdsn_id |
str
|
obspy |
title |
str
|
Human-readable description used in logs and docs. |
needs_token |
bool
|
Whether this network's event service requires an
access token. |
default_min_magnitude |
float
|
Network-appropriate default lower
magnitude bound (regional networks like INGV report much
smaller events than the global catalogs). Advisory — the
backend's own |
docs_url |
str
|
Link to the network's FDSN event-service documentation. |
Examples:
- Build a row directly:
Source code in libs/providers/hazards/src/earthlens/fdsn/catalog.py
catalog_to_fc(catalog, provider)
#
Convert an obspy Catalog into a FeatureCollection of events.
One row per event, columns per :data:ATTRIBUTE_COLUMNS plus a
geometry column of shapely.Point(longitude, latitude) in
EPSG:4326. An event with no usable origin (no preferred origin
and an empty origins list) still contributes a row, but its
geometry is None rather than an invalid POINT (nan nan) that
would corrupt a written GeoPackage/GeoJSON. An empty catalog
returns an empty FeatureCollection with the same columns/dtypes
(see :func:empty_fc) so the result type is identical whether or
not the query matched anything.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Catalog
|
An |
required |
provider
|
str
|
The user-facing provider key ( |
required |
Returns:
| Name | Type | Description |
|---|---|---|
FeatureCollection |
FeatureCollection
|
One feature per event, CRS |
Examples:
- Map a one-event catalog and read back a field:
>>> from obspy.core.event import Catalog, Event, Origin, Magnitude >>> from obspy import UTCDateTime >>> origin = Origin( ... time=UTCDateTime("2024-01-01T00:00:00"), ... longitude=12.5, latitude=42.0, depth=10000.0, ... evaluation_status="reviewed", ... ) >>> magnitude = Magnitude(mag=5.2, magnitude_type="Mw") >>> event = Event( ... origins=[origin], magnitudes=[magnitude], ... event_type="earthquake", ... ) >>> from earthlens.fdsn.events import catalog_to_fc >>> fc = catalog_to_fc(Catalog(events=[event]), "USGS") >>> len(fc) 1 >>> float(fc["depth_km"].iloc[0]) 10.0 >>> fc["provider"].iloc[0] 'USGS' >>> fc.crs.to_epsg() 4326
Source code in libs/providers/hazards/src/earthlens/fdsn/events.py
empty_fc()
#
Return an empty FeatureCollection with the canonical event schema.
Used for a query that matched nothing (a quiet region/time, an
HTTP-204 FDSNNoDataException) so callers always get the same
columns and dtypes back regardless of hit count — an empty result
is a legitimate answer, not an error.
Returns:
| Name | Type | Description |
|---|---|---|
FeatureCollection |
FeatureCollection
|
Zero rows, the :data: |
Examples:
- The schema is present even with no rows:
Source code in libs/providers/hazards/src/earthlens/fdsn/events.py
resolve_earthscope_token(token=None)
#
Resolve an optional EarthScope access token.
Resolution order:
- The explicit
tokenargument, if non-empty. - The
EARTHSCOPE_TOKENenvironment variable. - A
~/.earthscope_tokenfile (first non-empty line).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
token
|
str | None
|
An explicit token passed by the caller, or |
None
|
Returns:
| Type | Description |
|---|---|
str | None
|
The resolved token string, or |
Examples:
- An explicit token wins and is returned unchanged:
- With no argument, env var, or file, the result is
None:
Source code in libs/providers/hazards/src/earthlens/fdsn/auth.py
earthlens.fdsn.backend
#
Backend that queries FDSN-event seismological networks via obspy.
FDSN(AbstractDataSource) fetches earthquake / seismic-event catalogs
from the six IRIS-FDSN-event networks earthlens ships with — USGS
(ComCat), EMSC (seismicportal), INGV (Italian seismic + volcano),
EarthScope (ex-IRIS DMC), ISC (global reviewed bulletin), and GeoNet
(New Zealand) — through one obspy.clients.fdsn.Client per network,
because they all speak the identical FDSN-event web-service
standard. Each provider key in variables becomes one server-side
get_events call; the per-network obspy.core.event.Catalog is mapped
to a pyramids :class:~pyramids.feature.collection.FeatureCollection
by :mod:earthlens.fdsn.events.
This is the first vector backend: the on-the-wire result is a table
of point features, not a gridded array, so OUTPUT_KIND = "vector"
and an aggregate= argument is refused (there is no meaningful
gridded reduction of an event table). The refusal itself lives in
:meth:earthlens.base.AbstractDataSource._refuse_unsupported_aggregate,
which every backend's download routes through, so a direct
FDSN(...).download(aggregate=...) is rejected identically to one
made through the :class:earthlens.earthlens.EarthLens facade.
download() returns the in-memory FeatureCollection (the union across
requested networks) and, as a side effect, writes one vector file per
network to path.
Optionally the backend also writes a raster side-output: with
with_shakemap=True each USGS event's gridded ShakeMap is fetched and
written as a GeoTIFF alongside the vector files. This does not change
OUTPUT_KIND — download() still returns the event FeatureCollection
and the rasters are a side effect on disk. ShakeMap is a USGS ComCat
product and is not exposed through the FDSN event standard at all, so
that path is USGS-only and costs one extra request per event — see
:mod:earthlens.fdsn._helpers.
Provider selection follows the FDSN-specific reading of variables
(see the package docstring): variables is a list[str] of network
keys (["USGS"], ["USGS", "EMSC"]); query filters arrive as
explicit constructor kwargs. The temporal window is a single
unchunked [start, end] get_events call — FDSN does not iterate per
day/month — so temporal_resolution carries the sentinel "all".
FDSN
#
Bases: AbstractDataSource
FDSN seismic-event backend (vector point-feature output).
Wraps obspy.clients.fdsn.Client.get_events so a user can pull a
space/time/magnitude window of seismic events from one or more
FDSN networks through the same download() shape every other
earthlens backend uses. Each network key in variables becomes
one server-side query; the per-network catalog is mapped to a
:class:~pyramids.feature.collection.FeatureCollection and the
networks' results are unioned into the single FeatureCollection
download() returns.
The public event services need no credentials; the optional
EarthScope token is resolved lazily and only used for a provider
whose catalog row declares needs_token: true.
Attributes:
| Name | Type | Description |
|---|---|---|
OUTPUT_KIND |
OutputKind
|
|
Examples:
- Build a plain event query and inspect what it resolved:
>>> from earthlens.fdsn import FDSN >>> backend = FDSN( ... start="2024-01-01", ... end="2024-01-31", ... variables=["USGS"], ... lat_lim=[30.0, 45.0], ... lon_lim=[130.0, 145.0], ... ) >>> backend.vars ['USGS'] >>> backend.time.resolution 'all' >>> backend.space.south, backend.space.east (30.0, 145.0) - An empty network list falls back to USGS, and the products the query will issue carry the resolved obspy client id:
- Asking for the ShakeMap side-output selects one grid by default and leaves the returned shape a vector table:
Source code in libs/providers/hazards/src/earthlens/fdsn/backend.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 | |
__init__(start, end, variables, lat_lim, lon_lim, temporal_resolution='all', path=None, fmt='%Y-%m-%d', min_magnitude=None, max_magnitude=None, min_depth=None, max_depth=None, magnitude_type=None, event_type=None, orderby='time', limit=None, earthscope_token=None, file_format='gpkg', with_shakemap=False, shakemap_layers=None, max_shakemap_events=_DEFAULT_MAX_SHAKEMAP_EVENTS)
#
Initialise an FDSN backend instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
str
|
Inclusive start of the event window, as a string
parsed with |
required |
end
|
str
|
Inclusive end of the event window. |
required |
variables
|
list[str]
|
List of FDSN network keys to query ( |
required |
lat_lim
|
list[float]
|
|
required |
lon_lim
|
list[float]
|
|
required |
temporal_resolution
|
str
|
FDSN does not chunk by day/month — the
whole |
'all'
|
path
|
Path | str | None
|
Output directory for the per-network vector files. Created by the parent class if absent. |
None
|
fmt
|
str
|
|
'%Y-%m-%d'
|
min_magnitude
|
float | None
|
Lower magnitude bound. |
None
|
max_magnitude
|
float | None
|
Upper magnitude bound, or |
None
|
min_depth
|
float | None
|
Lower depth bound in kilometres, or |
None
|
max_depth
|
float | None
|
Upper depth bound in kilometres, or |
None
|
magnitude_type
|
str | None
|
Restrict to a magnitude type (e.g.
|
None
|
event_type
|
str | None
|
Restrict to an event type (e.g.
|
None
|
orderby
|
str
|
Result ordering — |
'time'
|
limit
|
int | None
|
Maximum number of events per network, or |
None
|
earthscope_token
|
str | None
|
Optional EarthScope access token; falls
back to |
None
|
file_format
|
FileFormat
|
Output vector format — |
'gpkg'
|
with_shakemap
|
bool
|
Also fetch each event's gridded ShakeMap and
write it as a GeoTIFF under |
False
|
max_shakemap_events
|
int
|
Ceiling on how many events one call
will fetch a ShakeMap for, guarding against a broad
query quietly pulling gigabytes (each event is a
separate request plus a multi-megabyte archive). Events past
the ceiling are deferred with a warning naming the
count — never silently. The ceiling counts fetches,
not events: an event already satisfied on disk costs no
budget, and an id that can never be fetched at all is
dropped before counting. So re-running the same request
takes the next batch, and repeating it eventually walks
the whole list. The one exception is an event that fails
on every attempt: a failure is not cached, so it is
retried each run and keeps its place in the queue.
Within a run the events kept are the first
|
_DEFAULT_MAX_SHAKEMAP_EVENTS
|
shakemap_layers
|
list[str] | None
|
Which ShakeMap grids to write when
|
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
TypeError
|
If |
Source code in libs/providers/hazards/src/earthlens/fdsn/backend.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | |
download(progress_bar=True, errors='warn', limit=None, force=False)
#
Query every requested network and return the unioned events.
Each network in self.vars is queried once; its events are
written to one vector file under path (named after the
network), and the per-network results are concatenated into the
single :class:FeatureCollection returned. A network that
errors is logged and skipped (its events are simply absent from
the union) rather than aborting the whole request; only a total
failure — every network errored — raises. An all-empty result
(every network matched nothing) returns a schema-correct empty
FeatureCollection and writes nothing.
When the instance was built with with_shakemap=True, each USGS
event additionally gets its ShakeMap grids written as GeoTIFFs
under path/shakemap/<event>/. Those rasters are a side effect
only — the return value stays the event FeatureCollection. An
event whose ShakeMap cannot be fetched is logged and skipped
under the same errors= policy as a failed network, so one
missing grid never costs the event table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
progress_bar
|
bool
|
Whether to show a progress bar. obspy's
|
True
|
errors
|
str
|
Partial-failure policy, applied to both the
per-network query loop and the per-event ShakeMap loop.
|
'warn'
|
force
|
bool
|
Refetch a ShakeMap whose GeoTIFFs are already on
disk instead of reusing them. A |
False
|
limit
|
int | None
|
Maximum events per network, overriding the constructor's
|
None
|
Returns:
| Name | Type | Description |
|---|---|---|
FeatureCollection |
FeatureCollection
|
The row-wise union of every requested
network's events, CRS |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If every requested network's query failed
(propagated from :meth: |
Source code in libs/providers/hazards/src/earthlens/fdsn/backend.py
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | |
earthlens.fdsn.catalog
#
Provider dispatch table for the FDSN seismic-event backend.
FDSN is a fixed query protocol, not a curated dataset catalogue, so
this "catalog" is deliberately tiny: a six-row map from a user-facing
network name ("USGS", "EMSC", "INGV", "EARTHSCOPE", "ISC",
"GEONET") to the obspy URL_MAPPINGS key plus a little metadata.
Adding another network later (ORFEUS, GFZ, …) is a hand-edit of one
YAML row. There is no probe handler and no tools/fdsn/ directory,
but the backend does ship refresh and validate handlers in
earthlens.fdsn.cli: refresh lists the data centres obspy can reach
(its URL_MAPPINGS registry, no network call) and diffs them against
the fdsn_id values curated here, so a centre obspy gains or drops
surfaces instead of going unnoticed. audit works too, derived from
the refresher's drift axis rather than from a handler of its own.
:class:Catalog is a thin :class:earthlens.base.AbstractCatalog
subclass. To stay consistent with the other backends (GEE / ECMWF /
CMEMS), the network rows are stored in the framework's
:attr:~earthlens.base.AbstractCatalog.datasets field — so the
inherited dict-like surface works (len(cat), name in cat,
cat[name], iter(cat), str(cat), :meth:get_dataset). Because
the FDSN domain term for a row is a network / provider, the same
map is mirrored onto :attr:~earthlens.base.AbstractCatalog.providers
and :meth:get_provider works too — they are aliases of the same
rows. Parsing is cached on (path, mtime) exactly like the other
backends (see :data:_CATALOG_CACHE / :func:clear_catalog_cache).
:data:CATALOG_PATH is the path to the bundled YAML and is
monkey-patchable in tests.
Catalog
#
Bases: AbstractCatalog
Provider catalog for the FDSN seismic-event backend.
Reads the bundled fdsn_data_catalog.yaml (shipped as package
data) and exposes its providers: block as a map of
:class:Provider rows. Instantiate with no arguments
(Catalog()); :func:model_post_init loads and validates the YAML
(cached) in one pass.
The rows live in the framework's :attr:datasets field so the
inherited dict-like surface behaves like every other backend's
catalog — len(cat), name in cat, cat[name], iter(cat) and
:meth:get_dataset all work. The same rows are mirrored onto
:attr:providers, so the domain-friendly :meth:get_provider and
cat.providers work too; the two are aliases of one another.
Attributes:
| Name | Type | Description |
|---|---|---|
datasets |
dict[str, Provider]
|
Map from the user-facing network name to its
:class: |
providers |
dict[str, Provider]
|
Alias of :attr: |
Examples:
- The dict-like surface works like the other backends:
datasetsandprovidersare the same rows; resolve via either accessor:- An unknown network raises with a did-you-mean hint:
Source code in libs/providers/hazards/src/earthlens/fdsn/catalog.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | |
get_catalog()
#
Return the network map (satisfies the abstract contract).
Returns:
| Type | Description |
|---|---|
dict[str, Provider]
|
dict[str, Provider]: Same object as :attr: |
load(catalog_path=None)
classmethod
#
Read the FDSN provider catalog from disk (cached).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog_path
|
Path | None
|
Path to the catalog YAML. Defaults to the
module-level :data: |
None
|
Returns:
| Type | Description |
|---|---|
Catalog
|
A fully-populated :class: |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the file has no |
Source code in libs/providers/hazards/src/earthlens/fdsn/catalog.py
model_post_init(__context)
#
Auto-load the bundled catalog and keep datasets/providers in sync.
Catalog() with no args reads :data:CATALOG_PATH (cached).
Passing either datasets=... or providers=... skips the disk
read (used in tests); whichever was supplied is mirrored onto
the other so both accessors stay consistent.
Raises:
| Type | Description |
|---|---|
ValueError
|
Propagated from :func: |
Source code in libs/providers/hazards/src/earthlens/fdsn/catalog.py
Provider
#
Bases: BaseModel
One FDSN-event network's dispatch row.
The user-facing name is the parent key in
:attr:Catalog.providers (and :attr:Catalog.datasets) and is not
stored on the row.
Attributes:
| Name | Type | Description |
|---|---|---|
fdsn_id |
str
|
obspy |
title |
str
|
Human-readable description used in logs and docs. |
needs_token |
bool
|
Whether this network's event service requires an
access token. |
default_min_magnitude |
float
|
Network-appropriate default lower
magnitude bound (regional networks like INGV report much
smaller events than the global catalogs). Advisory — the
backend's own |
docs_url |
str
|
Link to the network's FDSN event-service documentation. |
Examples:
- Build a row directly:
Source code in libs/providers/hazards/src/earthlens/fdsn/catalog.py
clear_catalog_cache()
#
Empty the module-level catalog parse cache.
Useful in tests that rewrite the catalog on disk and want to force
a re-parse. Production callers do not need this — the cache key
includes the file's st_mtime_ns, so any real edit invalidates the
entry on its own.
Source code in libs/providers/hazards/src/earthlens/fdsn/catalog.py
earthlens.fdsn.events
#
Map an obspy event catalog into a pyramids FeatureCollection.
This module is the only place in the FDSN backend that touches a GIS
vector container, so per the pyramids policy it keeps all
geometry/CRS handling inside pyramids primitives: earthlens assembles
the plain attribute rows, builds a Point geometry column from the
origin longitude/latitude, and hands the whole thing to
:class:pyramids.feature.collection.FeatureCollection (a
geopandas.GeoDataFrame subclass) tagged EPSG:4326.
The canonical event schema lives here as :data:ATTRIBUTE_COLUMNS
(attribute columns + dtypes) plus the geometry column. Both the
populated path (:func:catalog_to_fc) and the empty path
(:func:empty_fc) produce a FeatureCollection with exactly these
columns and dtypes, so a downstream pandas.concat / to_file never
chokes on a schema mismatch between a hit and a miss.
The unit conventions follow the FDSN event standard as obspy exposes
it: origin.depth is in metres (divided by 1000 for depth_km),
origin.time is a UTCDateTime (converted to a tz-aware UTC
datetime64), and preferred_origin() / preferred_magnitude() can
return None, so the first list element is used as a fallback.
catalog_to_fc(catalog, provider)
#
Convert an obspy Catalog into a FeatureCollection of events.
One row per event, columns per :data:ATTRIBUTE_COLUMNS plus a
geometry column of shapely.Point(longitude, latitude) in
EPSG:4326. An event with no usable origin (no preferred origin
and an empty origins list) still contributes a row, but its
geometry is None rather than an invalid POINT (nan nan) that
would corrupt a written GeoPackage/GeoJSON. An empty catalog
returns an empty FeatureCollection with the same columns/dtypes
(see :func:empty_fc) so the result type is identical whether or
not the query matched anything.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Catalog
|
An |
required |
provider
|
str
|
The user-facing provider key ( |
required |
Returns:
| Name | Type | Description |
|---|---|---|
FeatureCollection |
FeatureCollection
|
One feature per event, CRS |
Examples:
- Map a one-event catalog and read back a field:
>>> from obspy.core.event import Catalog, Event, Origin, Magnitude >>> from obspy import UTCDateTime >>> origin = Origin( ... time=UTCDateTime("2024-01-01T00:00:00"), ... longitude=12.5, latitude=42.0, depth=10000.0, ... evaluation_status="reviewed", ... ) >>> magnitude = Magnitude(mag=5.2, magnitude_type="Mw") >>> event = Event( ... origins=[origin], magnitudes=[magnitude], ... event_type="earthquake", ... ) >>> from earthlens.fdsn.events import catalog_to_fc >>> fc = catalog_to_fc(Catalog(events=[event]), "USGS") >>> len(fc) 1 >>> float(fc["depth_km"].iloc[0]) 10.0 >>> fc["provider"].iloc[0] 'USGS' >>> fc.crs.to_epsg() 4326
Source code in libs/providers/hazards/src/earthlens/fdsn/events.py
concat_fcs(collections)
#
Concatenate per-provider FeatureCollections into one.
Skips empty inputs; returns :func:empty_fc when every input is
empty (or the list is empty) so the result is always a
schema-correct FeatureCollection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
collections
|
list[FeatureCollection]
|
Per-provider FeatureCollections, each produced by
:func: |
required |
Returns:
| Name | Type | Description |
|---|---|---|
FeatureCollection |
FeatureCollection
|
The row-wise union, CRS |
Source code in libs/providers/hazards/src/earthlens/fdsn/events.py
empty_fc()
#
Return an empty FeatureCollection with the canonical event schema.
Used for a query that matched nothing (a quiet region/time, an
HTTP-204 FDSNNoDataException) so callers always get the same
columns and dtypes back regardless of hit count — an empty result
is a legitimate answer, not an error.
Returns:
| Name | Type | Description |
|---|---|---|
FeatureCollection |
FeatureCollection
|
Zero rows, the :data: |
Examples:
- The schema is present even with no rows:
Source code in libs/providers/hazards/src/earthlens/fdsn/events.py
earthlens.fdsn.auth
#
Optional EarthScope token resolution for the FDSN backend.
The six FDSN-event networks earthlens ships with (USGS, EMSC, INGV,
EarthScope, ISC, GeoNet) all expose public event web services, so
the common path needs no credentials at all. This module is intentionally thin:
it only resolves an optional EarthScope access token from, in
priority order, an explicit argument, the EARTHSCOPE_TOKEN
environment variable, or a ~/.earthscope_token file. The backend
consults it only when a provider row declares needs_token: true,
which none of the bundled public networks do.
There is deliberately no credentialed-login class here (unlike
:class:earthlens.cmems.CmemsAuth / earthlens.gee.EarthEngineAuth)
— event queries do not authenticate.
resolve_earthscope_token(token=None)
#
Resolve an optional EarthScope access token.
Resolution order:
- The explicit
tokenargument, if non-empty. - The
EARTHSCOPE_TOKENenvironment variable. - A
~/.earthscope_tokenfile (first non-empty line).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
token
|
str | None
|
An explicit token passed by the caller, or |
None
|
Returns:
| Type | Description |
|---|---|
str | None
|
The resolved token string, or |
Examples:
- An explicit token wins and is returned unchanged:
- With no argument, env var, or file, the result is
None:
Source code in libs/providers/hazards/src/earthlens/fdsn/auth.py
earthlens.fdsn.cli
#
Catalog-tooling handlers for the FDSN backend.
Registered with core's catalog-tooling commands through the earthlens.cli
entry-point group (see earthlens._hazards_cli). The refresh axis is obspy's
URL_MAPPINGS registry — the same source the catalog is curated from — so a
diff surfaces data centres obspy has gained or dropped.
refresher(_catalog)
#
List every FDSN provider id obspy can reach (SDK enum, no network).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
_catalog
|
Any
|
The loaded FDSN |
required |
Returns:
| Type | Description |
|---|---|
dict[str, list[str]]
|
A single-group mapping |
Source code in libs/providers/hazards/src/earthlens/fdsn/cli.py
validator(catalog)
#
Each FDSN network needs an fdsn_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Any
|
The loaded FDSN |
required |
Returns:
| Type | Description |
|---|---|
tuple[int, list[str]]
|
|