Skip to content

Commit

Permalink
add expection for reading Tipper data
Browse files Browse the repository at this point in the history
  • Loading branch information
earthai-tech committed Jul 3, 2023
1 parent fc45533 commit 9830677
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions pycsamt/modeling/occam2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,7 @@ def parse_block_data(self, datablocks=None):
return_counts= True)
sites.astype('int32')
freq.astype('int32')



# get mode and create model array
k_=None
m_= [int(s) for s in datum]
Expand All @@ -448,8 +447,8 @@ def parse_block_data(self, datablocks=None):
self.occam_dtype_ =k_
self.occam_dtype_value = values
break

cf =False

if self.occam_dtype_ =='log_te_tm':
self.te_appRho =np.zeros((len(freq), len(sites)))
self.te_phase = np.zeros((len(freq), len(sites)))
Expand All @@ -471,7 +470,11 @@ def parse_block_data(self, datablocks=None):
self.tm_phase = np.zeros((len(freq), len(sites)))
self.tm_error_appRho = np.zeros((len(freq), len(sites)))
self.tm_error_phase = np.zeros((len(freq), len(sites)))

else:
raise CSex.pyCSAMTError_occam2d(
"Three dimensional and Tipper are not implemented yet."
" Please use MTpy (https://github.com/MTgeophysics/mtpy.git)"
" or ModEM (http://www.coas.oregonstate.edu) instead.")
# create for each mode id datablocks

for kk, rowlines in enumerate(self.data):
Expand Down Expand Up @@ -926,9 +929,6 @@ def read_occam2d_modelfile(self, model_fn=None, mesh_fn=None , iter_fn=None):
print('** {0:<27} {1} {2}'.format('Occam Roughness params', '=',
self.model_roughness))




class Startup(object):
"""
Occam startup file Actually read startup file.
Expand Down Expand Up @@ -1559,8 +1559,6 @@ def truncate_response (data , station_data, station_names ):
getattr(self, 'resp_{0}_{1}'.format(
occ, fwo.lower())).shape))



class Mesh(object):
"""
Read Occam read mesh file
Expand Down

0 comments on commit 9830677

Please sign in to comment.