rfn = r"c:\Users\jpeacock\Documents\MountainPass\modem_inv\inv_07\mp_z03_c03_NLCG_009.dat" save_path = r"c:\Users\jpeacock\Documents\MountainPass\modem_inv\inv_07" 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() pts.projection = map_projection pts.ellipse_size = 900 #### save files for data #pts.save_path = os.path.join(save_path, 'mp_pt_data_gn') #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_z03_c03_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')
edi_path = r"c:\Users\jpeacock\Documents\SaudiArabia\saudi_edi_N30W_shifted\edited\geographic_north" edi_list = [os.path.join(edi_path, edi_fn) for edi_fn in os.listdir(edi_path) if edi_fn.endswith('.edi')] save_path = r"c:\Users\jpeacock\Documents\SaudiArabia\GIS" 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