kbws.models.event module#
Pydantic request models for the FDSN event service.
- class kbws.models.event.EventFormat(*values)[source]#
Bases:
str,Enum- css = 'css'#
- json = 'json'#
- sql = 'sql'#
- text = 'text'#
- xml = 'xml'#
- class kbws.models.event.EventQuery(*, starttime: datetime | date | None = None, endtime: datetime | date | None = None, updatedafter: datetime | date | None = None, minlatitude: Annotated[float | None, Ge(ge=-90.0), Le(le=90.0)] = None, maxlatitude: Annotated[float | None, Ge(ge=-90.0), Le(le=90.0)] = None, minlongitude: Annotated[float | None, Ge(ge=-180.0), Le(le=180.0)] = None, maxlongitude: Annotated[float | None, Ge(ge=-180.0), Le(le=180.0)] = None, mindepth: float | None = None, maxdepth: float | None = None, minmagnitude: float | None = None, maxmagnitude: float | None = None, magnitudetype: str | None = None, eventtype: str | None = None, includeallorigins: bool = False, includeallmagnitudes: bool = False, preferredmagnitude: str | None = None, contributor: str | None = None, includearrivals: bool = False, eventid: str | None = None, nodata: NoData = '204', format: EventFormat = 'xml')[source]#
Bases:
BaseModel- contributor: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Limit to events contributed by a specified contributor (matches Origin.auth).', examples='ISC')]#
- endtime: Annotated[datetime | date | None, FieldInfo(annotation=NoneType, required=True, description='Limit results to events occurring on or before the specified end time, using ISO8601 format YYYY-MM-DDThh:mm:ss[.ssssss]', examples='2012-11-03')]#
- eventid: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Select a specific event by ID; event identifiers are data center specific. Corresponds to an evid, returns a prefor.', examples='5659275')]#
- eventtype: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Limit to events with a specified eventType. The parameter value can be a single item, a comma-separated list of items. Allowed values are from QuakeML or unknown if eventType is not given.', examples='Mw')]#
- format: Annotated[EventFormat, FieldInfo(annotation=NoneType, required=True, description='Specify format of result: xml (default) is QuakeML, text (FDSN event text), css (text Origin table rows), json, or sql (the SQL query that was built, not the results).')]#
- includeallmagnitudes: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Specify if all magnitudes for the event should be included, default is data center dependent but is suggested to be the preferred magnitude only.')]#
- includeallorigins: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Specify if all origins for the event should be included, default is data center dependent but is suggested to be the preferred origin only.')]#
- includearrivals: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Specify if phase arrivals should be included')]#
- magnitudetype: Annotated[str | None, Query(PydanticUndefined)]#
- maxdepth: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='Limit to events with depth less than the specified maximum, in kilometers.', examples=100)]#
- maxlatitude: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='Limit to events with a latitude smaller than or equal to the specified maximum.', examples=46.9, metadata=[Ge(ge=-90.0), Le(le=90.0)])]#
- maxlongitude: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='Limit to events with a longitude smaller than or equal to the specified maximum.', examples=5.3, metadata=[Ge(ge=-180.0), Le(le=180.0)])]#
- maxmagnitude: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='Limit to events with a magnitude smaller than the specified maximum.', examples=8.3)]#
- mindepth: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='Limit to events with depth more than the specified minimum, in kilometers.', examples=1.3)]#
- minlatitude: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='Limit to events with a latitude larger than or equal to the specified minimum.', examples=40.1, metadata=[Ge(ge=-90.0), Le(le=90.0)])]#
- minlongitude: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='Limit to events with a longitude larger than or equal to the specified minimum.', examples=-10.5, metadata=[Ge(ge=-180.0), Le(le=180.0)])]#
- minmagnitude: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='Limit to events with a magnitude larger than the specified minimum.', examples=-1.0)]#
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- nodata: Annotated[NoData, FieldInfo(annotation=NoneType, required=True, description='Select status code for “no data”, either 204 (default) or 404')]#
- preferredmagnitude: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description="Comma-separated magnitude types in preferred order, used to select the preferred network magnitude when includeallmagnitudes is false. Defaults to 'mb,mw,ms'. CSS-like databases have no concept of a preferred magnitude (type) for when `includeallmagnitudes=False` and a single 'preferred' magnitude is returned. Default follows the service's standard default.", examples='mb,mw,ms')]#
- starttime: Annotated[datetime | date | None, FieldInfo(annotation=NoneType, required=True, description='Limit results to events occurring on or after the specified start time, using `ISO8601` format YYYY-MM-DDThh:mm:ss[.ssssss]', examples='2012-11-01T00:00:00.000')]#
- updatedafter: Annotated[datetime | date | None, FieldInfo(annotation=NoneType, required=True, description='Limit to events updated after the specified time, using ISO8601 format YYYY-MM-DDThh:mm:ss[.ssssss]', examples='2012-11-03')]#