Coverage for C: \ Users \ peaco \ OneDrive \ Documents \ GitHub \ mt_metadata \ mt_metadata \ common \ orientation.py: 100%
9 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-10 00:11 -0800
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-10 00:11 -0800
1# =====================================================
2# Imports
3# =====================================================
4from typing import Annotated
6from pydantic import Field
8from mt_metadata.base import MetadataBase
9from mt_metadata.common.enumerations import (
10 ChannelOrientationEnum,
11 GeographicReferenceFrameEnum,
12 OrientationMethodEnum,
13)
16# =====================================================
19class Orientation(MetadataBase):
20 method: Annotated[
21 OrientationMethodEnum,
22 Field(
23 default="compass",
24 description="method for orienting station layout",
25 alias=None,
26 json_schema_extra={
27 "units": None,
28 "required": True,
29 "examples": "compass",
30 "type": "string",
31 },
32 ),
33 ]
35 reference_frame: Annotated[
36 GeographicReferenceFrameEnum,
37 Field(
38 default=GeographicReferenceFrameEnum.geographic,
39 description="Reference frame for station layout. There are only 2 options geographic and geomagnetic. Both assume a right-handed coordinate system with North=0 E=90 and vertical positive downward",
40 alias=None,
41 json_schema_extra={
42 "units": None,
43 "required": True,
44 "examples": "geomagnetic",
45 "type": "string",
46 },
47 ),
48 ]
50 angle_to_geographic_north: Annotated[
51 float | None,
52 Field(
53 default=None,
54 description="Angle to rotate the data to align with geographic north. If this number is 0 then it is assumed the data are aligned with geographic north in a right handed coordinate system.",
55 alias=None,
56 json_schema_extra={
57 "units": "degrees",
58 "required": False,
59 "examples": "geomagnetic",
60 "type": "number",
61 },
62 ),
63 ]
65 value: Annotated[
66 ChannelOrientationEnum | None,
67 Field(
68 default=ChannelOrientationEnum.orthogonal,
69 description="Channel orientation relative to each other",
70 alias=None,
71 json_schema_extra={
72 "units": None,
73 "required": False,
74 "examples": "orthogonal",
75 "type": "string",
76 },
77 ),
78 ]