Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/MTgeophysics/mtpy into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
kujaku11 committed May 8, 2019
2 parents 9ee4cd6 + b9dd5ee commit 1614298
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mtpy/utils/convert_modem_data_to_geogrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ def modem2geotiff(data_file, model_file, output_file, source_proj=None):
# result['latitude'], result['longitude'], result['depth'],
# result['resistivity'], z_label='depth')

# test_array2geotiff_writer(output_file)


print("result['latitude'] ==", result['latitude'])
print("result['longitude'] ==", result['longitude'])
print("result['depth'] ==", result['depth'])
Expand All @@ -127,7 +124,9 @@ def modem2geotiff(data_file, model_file, output_file, source_proj=None):

# write the depth_index
depth_index=1
array2geotiff_writer(output_file,origin,pixel_width,pixel_height,result['resistivity'][depth_index,:,:])
resis_data = result['resistivity'][depth_index,:,:]
resis_data2 = resis_data[::-1] # flipped upside down to get geotiff mapped correctly.
array2geotiff_writer(output_file,origin,pixel_width,pixel_height,resis_data2)

return output_file

Expand All @@ -146,3 +145,6 @@ def modem2geotiff(data_file, model_file, output_file, source_proj=None):
args = parser.parse_args()

modem2geotiff(args.modem_data, args.modem_model, args.output_file, args.epsg)


test_array2geotiff_writer("test_geotiff_GDAL_img.tif")

0 comments on commit 1614298

Please sign in to comment.