map_projection = 'WGS84'
theta_r = 0

def check_dir(directory_path):
    if os.path.isdir(directory_path) is False:
        os.mkdir(directory_path)
        print 'Made directory {0}'.format(directory_path)
        
#-----------------------------------------------------------
###--> write phase tensor shape files
pts = shapefiles.PTShapeFile(edi_list=edi_list)
pts.projection = map_projection
pts.ellipse_size = 5000.
pts.rotation_angle = theta_r
pts.save_path = os.path.join(save_path, 'SA_PT_GN')
check_dir(pts.save_path)
pts.write_shape_files()

#----------------------------------------------------------------
#--> write tipper information
tps = shapefiles.TipperShapeFile(edi_list=edi_list)
tps.arrow_size = 10000.
tps.arrow_head_height = 350
tps.arrow_head_width = 200
tps.arrow_lw = 100
tps.projection = map_projection
tps.rotation_angle = theta_r
tps.save_path = os.path.join(save_path, 'SA_TIP_GN')
check_dir(tps.save_path)
tps.write_imag_shape_files()
tps.write_real_shape_files()
Beispiel #2
0
check_dir(pts.save_path)
pts.write_data_pt_shape_files_modem(dfn, rotation_angle=theta_r)

##save files for model response
# pts.save_path = os.path.join(save_path, 'gz_pt_model_gn')
# check_dir(pts.save_path)
# pts.write_resp_pt_shape_files_modem(dfn, rfn, rotation_angle=theta_r)
#
##save files for data-model
# pts.save_path = os.path.join(save_path, 'gz_pt_residual_gn')
# check_dir(pts.save_path)
# pts.write_residual_pt_shape_files_modem(dfn, rfn, rotation_angle=theta_r)

# ----------------------------------------------------------------
##--> write tipper information
tps = shapefiles.TipperShapeFile()
tps.arrow_size = 10000
tps.arrow_head_height = 750
tps.arrow_head_width = 600
tps.arrow_lw = 100
tps.projection = map_projection
#
# save files for data
tps.save_path = os.path.join(save_path, "cl_tipper_data")
check_dir(tps.save_path)
tps.write_tip_shape_files_modem(dfn, rotation_angle=theta_r)
#
##save files for response
# tps.save_path = os.path.join(save_path, 'gz_tipper_model')
# check_dir(tps.save_path)
# tps.write_tip_shape_files_modem(rfn, rotation_angle=theta_r)
Beispiel #3
0
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 27 13:17:03 2020

:author: Jared Peacock

:license: MIT

"""

from pathlib import Path
from mtpy.utils import shapefiles

edi_dir = Path(
    r"c:\Users\jpeacock\OneDrive - DOI\Geothermal\GabbsValley\EDI_Files_birrp\Edited\Interpolated"
)

edi_list = list(edi_dir.glob("*.edi"))

# ptm = shapefiles.PTShapeFile(edi_list,
#                              save_path=r"c:\Users\jpeacock\OneDrive - DOI\Geothermal\GabbsValley\EDI_Files_birrp\Edited\Interpolated\pt")
# ptm.write_shape_files()

tip = shapefiles.TipperShapeFile(
    edi_list,
    save_path=
    r"c:\Users\jpeacock\OneDrive - DOI\Geothermal\GabbsValley\EDI_Files_birrp\Edited\Interpolated\pt",
)
tip.write_imag_shape_files()
tip.write_real_shape_files()