Created
March 20, 2019 14:14
-
-
Save epifanio/6c483a8945efcad5148277357d7afc6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import datetime as dt\n", | |
"import parmap\n", | |
"import numpy as np\n", | |
"from pyproj import Proj, transform\n", | |
"from IPython.core.display import Image" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from mb_reader import readEM1000, gen_input" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"st_time = dt.datetime.now()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"100%|██████████| 129/129 [00:03<00:00, 35.49it/s]\n" | |
] | |
} | |
], | |
"source": [ | |
"em_files = list(gen_input(directory='/home/epinux/GreatSouthChannel/', \n", | |
" output_type='numpy.array',\n", | |
" reproject=True,\n", | |
" in_srs='EPSG:4326',\n", | |
" out_srs='EPSG:32619'))\n", | |
"\n", | |
"per_beam = parmap.map(readEM1000, \n", | |
" em_files, \n", | |
" pm_processes=48, \n", | |
" pm_pbar=True)\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"em_data = np.concatenate(([_ for _ in per_beam]), axis=0)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# em_data.view('f8,f8,f8,f8,f4').sort(order=['f3'], axis=0)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"---\n", | |
"* **Transform the Longitude and Latitude to WGS85 UTM 19 N** `EPSG:32619`\n", | |
"\n", | |
"No longer needed, transformation is now performed by `PDAL` during data reading" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#wgs84 = Proj(\"+init=EPSG:4326\")\n", | |
"#UTM19N = Proj(\"+init=EPSG:32619\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#XUTM, YUTM = transform(wgs84, UTM19N, em_data['X'], em_data['Y'])" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"---" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"* **Compute the index for the nadir beam of each ping**" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"| Beam Count | Nadir Index | integer resulting from: |\n", | |
"|------|------|------------------------------------------------|\n", | |
"| 54 | 27| $\\frac{54}{2}$ |\n", | |
"| 56 | 82| $54+\\frac{56}{2}$ |\n", | |
"| 59 | 139| $54+56+\\frac{59}{2}$ |\n", | |
"| 59 | 198| $54+56+59+\\frac{59}{2}$ |\n", | |
"| 58 | 257| $54+56+59+59+\\frac{58}{2}$ |" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"* **Compute the euclidean distance between `each beam` from the beam at the `nadir`**\n", | |
"\n", | |
"* **Compute the incidence angle for each beam**\n", | |
"\n", | |
"The incidence angle $\\theta$ is compute by:\n", | |
"\n", | |
"$$\n", | |
"\\theta = atan_2{\\frac{z}{d}}\n", | |
"$$" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAA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cO9uywX+u6is2bN8udd96Z3basSk6dOiU6gK1jEFkzqLLyvPST10peihZthUAACRw5ciTbaxWGtLQ047+szfL00B6ncxmyHxDGDxUrVrSOGq1bt67x1A8//FBSUlKyBcso4AED4uCBINFECASZwMcff5ztvs5Uckp6HrSmXr16Se3atZ2KRMRWp04dSyAqVapkPF+PIB07dqxh94oBcfBKpGgnBAJK4A9/+IPlec2aNaVq1aoGha+++kp0vyNNEydONPIjbWjevLn1iklfNdnT4sWLRWc4eTEhDl6MGm2GQIAI/PnPf7a8zW16qm5joUk34tON92KRdOxBNwN0Wl8xa9Ysee2112LRrELViTgUCh83QwACkSZQsmRJqwqnVze6lUbWyuVf/OIXkW7KDZ+vr7ReffVVxzKPPvqovPfee455bjUiDm6NDO2CAAQsAro7qianQ3b0L3K1615LuiFfrNO4cePkl7/8pdEMnWo7ePBgayDdyHSpgTOkbYEJ9/xoP2/pa0PHJQQiQkA3t3vqqadED+HRnoKuM9CkZzm0b99etEeRkZEh1atXj0j9BXnomDFj5O233zZu1RlOujaiZcuWRp7bDIiDLSKIgw0IlxCIMYG//vWvotNFVRgOHDggd9xxh+gme7orq45H6NTW+vXrx7iV11evq7l1Ow09e8KedDbVoUOHLJ/seW665rWSLRr6l344/7M9nksIQCBEAnpmg56poAPSffr0kSFDhoie0KZ/fR8/ftx1wqDu6cC0bvPtNPX2j3/8o7WKWkXPzYmeg5ujQ9sgAIFsArq5nW6R8b//+7/Zr5OyM136QQVAezo5NwXMaqradTPBMmXKZJlc9RNxcFU4aAwEIOA3Ar///e+tHsSf/vQnwzUdSNdZTE5TYI3CUTbwWinKwKkOAhAIFoHExERrFbXuFmtPmzZtkkceecRudsU14uCKMNAICEDAzwRatWolKgQ648qe9BCj6dOn280xv+a1UsxDQAMgAIGgEFi3bp30799fdN2DPeliPjftxUTPwR4hriEAAQhEiEDfvn3l5Zdfdny6vl7S3oVbEuLglkjQDghAIBAEJk2aJFOmTDF81bURegSqLuhzQ+K1khuiQBsgAIHAERg5c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K+Ci//e1vLQolSpSwZiXdCMnNN98stWrVulER8iDgewKIg+9DjINK4De/+Y0FQv/RL1o07699vXr1rPL8DwJBJZD3b0lQyeC3rwicOXPG8qdixYr58isuLi5f5SgEAb8SQBz8Gln8uo5Aw4YNrevf//7319lzu/jDH/6QWxZ2CASCAOIQiDDjZOPGjS0If/vb3+SPf/zjDYFoL+Prr7++YRkyIeB3AoiD3yOMfxYBPZ8hK73yyitZHx1/LlmyRM6dO+eYhxECQSGAOAQl0gH3c8CAAZKcnGxReP311+XIkSOORHSF9LPPPuuYhxECQSKAOAQp2gH2VRe4/du//ZtF4PTp09KpUyd57bXXsl8f6eZ7uhZCexj6OT8zmgKME9cDQIDtMwIQZFz8B4GUlBT561//am2Rcf78eZk4caKVobuwqmBkpZ///OeSlpZmHROaZeMnBIJGgJ5D0CIecH/Hjx8ve/fulQ4dOki5cuUsGlnCULt2bZk7dy6vlQL+HcH9fxAo8vctBf6xpwBEIBAwArrRnm7V/d///d/Spk0bqVq1asAI4C4EcieAOOTOhhwIQAACgSXAa6XAhh7HIQABCOROAHHInQ05EIAABAJLAHEIbOhxHAIQgEDuBBCH3NmQAwEIQCCwBBCHwIYexyEAAQjkTgBxyJ0NORCAAAQCSwBxCGzocRwCEIBA7gQQh9zZkAMBCEAgsAQQh8CGHschAAEI5E4AccidDTkQgAAEAksAcQhs6HEcAhCAQO4EEIfc2ZADAQhAILAEEIfAhh7HIQABCOROAHHInQ05EIAABAJLAHEIbOhxHAIQgEDuBP4fq4WZZhU60VQAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<IPython.core.display.Image object>" | |
] | |
}, | |
"execution_count": 9, | |
"metadata": { | |
"image/png": { | |
"width": 300 | |
} | |
}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Image(\"Image1.png\", width=300)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"unique, counts = np.unique(em_data['GpsTime'], return_counts=True)\n", | |
"beam_indexes = np.array([[i,v] for i,v in enumerate(list(counts))])\n", | |
"\n", | |
"ping_indexes = np.cumsum(beam_indexes[:,1])\n", | |
"input_indexes = list(range(len(ping_indexes)))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#x, y, z = em_data['X'], em_data['Y'], em_data['Z']" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from numba import jit, prange\n", | |
"\n", | |
"\n", | |
"@jit(nopython=True, nogil=True)\n", | |
"def getAngle(ping_index, x, y, z, ping_indexes, beam_indexes):\n", | |
" if ping_index == 0:\n", | |
" start=0\n", | |
" stop=ping_indexes[ping_index]\n", | |
" shape=ping_indexes[ping_index]\n", | |
" nadir_index = int( beam_indexes[ping_index][1]/2)\n", | |
" else:\n", | |
" start=ping_indexes[ping_index-1]\n", | |
" stop=ping_indexes[ping_index]\n", | |
" shape=ping_indexes[ping_index] - ping_indexes[ping_index-1]\n", | |
" nadir_index = int(np.sum(beam_indexes[0: beam_indexes[ping_index][0]][:,1]) + \n", | |
" ( beam_indexes[ping_index][1]/2))\n", | |
" XY = np.array([(x[nadir_index], y[nadir_index])])\n", | |
" pings = np.column_stack((x[start:stop], y[start:stop])) \n", | |
" Zi = z[start:stop] \n", | |
" a_min_b = XY - pings\n", | |
" d = np.sqrt(np.sum((a_min_b)**2, axis=1))\n", | |
" angle = np.rad2deg(np.arctan2(np.abs(Zi),d)).reshape(shape,)\n", | |
" #return [start, stop, angle]\n", | |
" return angle" | |
] | |
}, | |
{ | |
"cell_type": "raw", | |
"metadata": {}, | |
"source": [ | |
"# usage\n", | |
"getAngle(57, XUTM, YUTM, em_data['Z'], ping_indexes, beam_indexes)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"4320" | |
] | |
}, | |
"execution_count": 14, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"import multiprocessing\n", | |
"ncpu = multiprocessing.cpu_count()\n", | |
"chunksize = unique.shape[0]/ncpu\n", | |
"chunksize = int(chunksize - (chunksize%48))\n", | |
"chunksize" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 15, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"211680it [00:39, 6880.09it/s] \n" | |
] | |
} | |
], | |
"source": [ | |
"angles = parmap.map(getAngle, \n", | |
" input_indexes, \n", | |
" em_data['X'], em_data['Y'], em_data['Z'], \n", | |
" ping_indexes, \n", | |
" beam_indexes, \n", | |
" pm_processes=48, \n", | |
" pm_pbar=True, \n", | |
" pm_parallel=True, \n", | |
" pm_chunksize=chunksize)\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 16, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"angle_values = [beam for ping in angles for beam in ping]\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 17, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"pings = np.column_stack((em_data['X'], \n", | |
" em_data['Y'], \n", | |
" em_data['Z'], \n", | |
" em_data['Amplitude'], \n", | |
" angle_values))\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"end_time = dt.datetime.now()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"datetime.timedelta(0, 48, 303721)" | |
] | |
}, | |
"execution_count": 19, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"end_time-st_time" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"---" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 20, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"https://gist.github.com/59fd3dbaa7e10fa449bdf11ff4366bcb\n" | |
] | |
} | |
], | |
"source": [ | |
"!gist EM1000.ipynb mb_reader.py" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.7" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
from string import Template | |
import pandas as pd | |
import pdal | |
import sys | |
def gen_input(directory, | |
file_extension='.ALL', | |
reader_driver='mbio', | |
file_format='MBF_EMOLDRAW', | |
output_type='pandas.DataFrame', | |
reproject=False, | |
in_srs=None, | |
out_srs=None, | |
verbose=False): | |
assert output_type in ['numpy.array', 'pandas.DataFrame'], "Wrong output type" | |
dirlist= "{directory}/*{file_extension}".format(directory=directory, | |
file_extension=file_extension) | |
file_list = glob.glob(dirlist) | |
for result in file_list: | |
if reproject and in_srs and out_srs: | |
yield {"file_name": result, | |
"reader_driver": reader_driver, | |
"file_format": file_format, | |
"output_type": output_type, | |
"verbose": verbose, | |
"reproject": reproject, | |
"in_srs": in_srs, | |
"out_srs": out_srs} | |
else: | |
yield {"file_name":result, | |
"reader_driver":reader_driver, | |
"file_format":file_format, | |
"output_type":output_type, | |
"verbose":verbose} | |
def readEM1000_1(args): | |
file_name = args['file_name'] | |
if 'reader_driver' in args: | |
reader_driver=args['reader_driver'] | |
else: | |
reader_driver='mbio' | |
if 'file_format' in args: | |
file_format=args['file_format'] | |
else: | |
file_format='MBF_EMOLDRAW' | |
if 'output_type' in args: | |
output_type=args['output_type'] | |
else: | |
output_type='numpy.array' | |
assert output_type in ['numpy.array', 'pandas.DataFrame'], "rong output type" | |
if 'verbose' in args: | |
verbose=args['verbose'] | |
else: | |
verbose=False | |
t = Template('{"pipeline":[{"filename": "${file_name}","type":"readers.${reader_driver}","format" : "${file_format}"}]}') | |
json = t.substitute(file_name=file_name, reader_driver=reader_driver, file_format=file_format) | |
p = pdal.Pipeline(json) | |
p.validate() # check if our JSON and options were good | |
p.loglevel = 8 #really noisy | |
count = p.execute() | |
data = p.arrays[0] | |
if verbose: | |
if verbose == 1: | |
print('Read', count, 'points with', len(data.dtype), 'dimensions') | |
if verbose == 2: | |
print('Read', count, 'points with', len(data.dtype), 'dimensions') | |
print('Dimension names are', data.dtype.names) | |
if verbose == 3: | |
print('Read', count, 'points with', len(data.dtype), 'dimensions') | |
print('Dimension names are', data.dtype.names) | |
print('Metadata: ', p.metadata) | |
print('Log: ', p.log) | |
if output_type == 'numpy.array': | |
return data | |
if output_type == 'pandas.DataFrame': | |
return pd.DataFrame(data) | |
if output_type == 'count': | |
return count | |
def readEM1000(args): | |
file_name = args['file_name'] | |
if 'reader_driver' in args: | |
reader_driver=args['reader_driver'] | |
else: | |
reader_driver='mbio' | |
if 'file_format' in args: | |
file_format=args['file_format'] | |
else: | |
file_format='MBF_EMOLDRAW' | |
if 'output_type' in args: | |
output_type=args['output_type'] | |
else: | |
output_type='numpy.array' | |
assert output_type in ['numpy.array', 'pandas.DataFrame'], "wrong output type" | |
if 'verbose' in args: | |
verbose=args['verbose'] | |
else: | |
verbose=False | |
if all(opt in args for opt in ['reproject', 'in_srs', 'out_srs']): | |
#if args['reproject']: | |
in_srs=args['in_srs'] | |
out_srs=args['out_srs'] | |
t = Template('{"pipeline":[{"filename": "${file_name}","type":"readers.${reader_driver}","format" : "${file_format}"}, {"type":"filters.reprojection", "in_srs":"${in_srs}", "out_srs":"${out_srs}"}]}') | |
json = t.substitute(file_name=file_name, | |
reader_driver=reader_driver, | |
file_format=file_format, | |
in_srs=in_srs, | |
out_srs=out_srs) | |
else: | |
t = Template('{"pipeline":[{"filename": "${file_name}","type":"readers.${reader_driver}","format" : "${file_format}"}]}') | |
json = t.substitute(file_name=file_name, reader_driver=reader_driver, file_format=file_format) | |
#print(json) | |
p = pdal.Pipeline(json) | |
p.validate() # check if our JSON and options were good | |
p.loglevel = 8 #really noisy | |
count = p.execute() | |
data = p.arrays[0] | |
if verbose: | |
if verbose == 1: | |
print('Read', count, 'points with', len(data.dtype), 'dimensions') | |
if verbose == 2: | |
print('Read', count, 'points with', len(data.dtype), 'dimensions') | |
print('Dimension names are', data.dtype.names) | |
if verbose == 3: | |
print('Read', count, 'points with', len(data.dtype), 'dimensions') | |
print('Dimension names are', data.dtype.names) | |
print('Metadata: ', p.metadata) | |
print('Log: ', p.log) | |
if output_type == 'numpy.array': | |
return data | |
if output_type == 'pandas.DataFrame': | |
return pd.DataFrame(data) | |
if output_type == 'count': | |
return count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment