@@ -59,15 +59,9 @@ class MTData(OrderedDict, MTStations):
59
59
"""
60
60
61
61
def __init__ (self , mt_list = None , ** kwargs ):
62
- if mt_list is not None :
63
- for mt_obj in mt_list :
64
- self .add_station (mt_obj , compute_relative_location = False )
65
62
66
- MTStations .__init__ (
67
- self ,
68
- kwargs .pop ("utm_epsg" , None ),
69
- datum_epsg = kwargs .pop ("datum_epsg" , None ),
70
- ** kwargs ,
63
+ self ._coordinate_reference_frame_options = (
64
+ COORDINATE_REFERENCE_FRAME_OPTIONS
71
65
)
72
66
73
67
self .z_model_error = ModelErrors (
@@ -83,6 +77,7 @@ def __init__(self, mt_list=None, **kwargs):
83
77
mode = "tipper" ,
84
78
)
85
79
self .data_rotation_angle = 0
80
+ self .coordinate_reference_frame = "ned"
86
81
87
82
self .model_parameters = {}
88
83
@@ -101,8 +96,15 @@ def __init__(self, mt_list=None, **kwargs):
101
96
"model_parameters" ,
102
97
]
103
98
104
- self ._coordinate_reference_frame_options = (
105
- COORDINATE_REFERENCE_FRAME_OPTIONS
99
+ if mt_list is not None :
100
+ for mt_obj in mt_list :
101
+ self .add_station (mt_obj , compute_relative_location = False )
102
+
103
+ MTStations .__init__ (
104
+ self ,
105
+ kwargs .pop ("utm_epsg" , None ),
106
+ datum_epsg = kwargs .pop ("datum_epsg" , None ),
107
+ ** kwargs ,
106
108
)
107
109
108
110
def _validate_item (self , mt_obj ):
@@ -218,7 +220,9 @@ def clone_empty(self):
218
220
@property
219
221
def coordinate_reference_frame (self ):
220
222
"""coordinate reference frame ned or enu"""
221
- return self ._coordinate_reference_frame
223
+ return self ._coordinate_reference_frame_options [
224
+ self ._coordinate_reference_frame
225
+ ].upper ()
222
226
223
227
@coordinate_reference_frame .setter
224
228
def coordinate_reference_frame (self , value ):
@@ -670,9 +674,7 @@ def interpolate(
670
674
)
671
675
672
676
else :
673
- mt_data .add_station (
674
- new_mt_obj , compute_relative_location = False
675
- )
677
+ mt_data .add_station (new_mt_obj , compute_relative_location = False )
676
678
677
679
if not inplace :
678
680
return mt_data
@@ -696,9 +698,7 @@ def rotate(self, rotation_angle, inplace=True):
696
698
if not inplace :
697
699
rot_mt_obj = mt_obj .copy ()
698
700
rot_mt_obj .rotation_angle = rotation_angle
699
- mt_data .add_station (
700
- rot_mt_obj , compute_relative_location = False
701
- )
701
+ mt_data .add_station (rot_mt_obj , compute_relative_location = False )
702
702
else :
703
703
mt_obj .rotation_angle = rotation_angle
704
704
@@ -792,12 +792,8 @@ def compute_model_errors(
792
792
self .t_model_error .floor = t_floor
793
793
794
794
for mt_obj in self .values ():
795
- mt_obj .compute_model_z_errors (
796
- ** self .z_model_error .error_parameters
797
- )
798
- mt_obj .compute_model_t_errors (
799
- ** self .t_model_error .error_parameters
800
- )
795
+ mt_obj .compute_model_z_errors (** self .z_model_error .error_parameters )
796
+ mt_obj .compute_model_t_errors (** self .t_model_error .error_parameters )
801
797
802
798
def get_nearby_stations (self , station_key , radius , radius_units = "m" ):
803
799
"""Get stations close to a given station.
0 commit comments