-
-
Save lsetiawan/20c09c3eaa76508a741e31ff28a83402 to your computer and use it in GitHub Desktop.
Pulse Compression Investigation
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, | |
"id": "5021d804-c3a0-49b7-9b6c-8eadfb7430bd", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import echopype as ep\n", | |
"import numpy as np\n", | |
"from pathlib import Path\n", | |
"from echopype.testing import TEST_DATA_FOLDER\n", | |
"import xarray as xr\n", | |
"from dask.utils import memory_repr\n", | |
"import pandas as pd" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"id": "dae8553c", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"ek80_path = TEST_DATA_FOLDER / \"ek80\"\n", | |
"ek80_raw_path = str(ek80_path.joinpath(\"D20170912-T234910.raw\"))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"id": "660f32b5", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"/Users/lsetiawan/Repos/SSEC/echopype/echopype/utils/coding.py:87: UserWarning: Times can't be serialized faithfully to int64 with requested units 'seconds since 1900-01-01T00:00:00+00:00'. Resolution of 'microseconds' needed. Serializing times to floating point instead. Set encoding['dtype'] to integer dtype to serialize to int64. Set encoding['dtype'] to floating point dtype to silence this warning.\n", | |
" encoded_data, _, _ = coding.times.encode_cf_datetime(\n", | |
"/Users/lsetiawan/Repos/SSEC/echopype/echopype/utils/coding.py:87: UserWarning: Times can't be serialized faithfully to int64 with requested units 'seconds since 1900-01-01T00:00:00+00:00'. Resolution of 'microseconds' needed. Serializing times to floating point instead. Set encoding['dtype'] to integer dtype to serialize to int64. Set encoding['dtype'] to floating point dtype to silence this warning.\n", | |
" encoded_data, _, _ = coding.times.encode_cf_datetime(\n", | |
"/Users/lsetiawan/Repos/SSEC/echopype/echopype/utils/coding.py:87: UserWarning: Times can't be serialized faithfully to int64 with requested units 'seconds since 1900-01-01T00:00:00+00:00'. Resolution of 'microseconds' needed. Serializing times to floating point instead. Set encoding['dtype'] to integer dtype to serialize to int64. Set encoding['dtype'] to floating point dtype to silence this warning.\n", | |
" encoded_data, _, _ = coding.times.encode_cf_datetime(\n", | |
"/Users/lsetiawan/Repos/SSEC/echopype/echopype/utils/coding.py:87: UserWarning: Times can't be serialized faithfully to int64 with requested units 'seconds since 1900-01-01T00:00:00+00:00'. Resolution of 'microseconds' needed. Serializing times to floating point instead. Set encoding['dtype'] to integer dtype to serialize to int64. Set encoding['dtype'] to floating point dtype to silence this warning.\n", | |
" encoded_data, _, _ = coding.times.encode_cf_datetime(\n", | |
"/Users/lsetiawan/Repos/SSEC/echopype/echopype/utils/coding.py:87: UserWarning: Times can't be serialized faithfully to int64 with requested units 'seconds since 1900-01-01T00:00:00+00:00'. Resolution of 'microseconds' needed. Serializing times to floating point instead. Set encoding['dtype'] to integer dtype to serialize to int64. Set encoding['dtype'] to floating point dtype to silence this warning.\n", | |
" encoded_data, _, _ = coding.times.encode_cf_datetime(\n", | |
"/Users/lsetiawan/Repos/SSEC/echopype/echopype/utils/coding.py:87: UserWarning: Times can't be serialized faithfully to int64 with requested units 'seconds since 1900-01-01T00:00:00+00:00'. Resolution of 'microseconds' needed. Serializing times to floating point instead. Set encoding['dtype'] to integer dtype to serialize to int64. Set encoding['dtype'] to floating point dtype to silence this warning.\n", | |
" encoded_data, _, _ = coding.times.encode_cf_datetime(\n", | |
"/Users/lsetiawan/Repos/SSEC/echopype/echopype/utils/coding.py:87: UserWarning: Times can't be serialized faithfully to int64 with requested units 'seconds since 1900-01-01T00:00:00+00:00'. Resolution of 'nanoseconds' needed. Serializing times to floating point instead. Set encoding['dtype'] to integer dtype to serialize to int64. Set encoding['dtype'] to floating point dtype to silence this warning.\n", | |
" encoded_data, _, _ = coding.times.encode_cf_datetime(\n" | |
] | |
} | |
], | |
"source": [ | |
"echodata = ep.open_raw(ek80_raw_path, sonar_model=\"EK80\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"id": "210961fa", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"cal_obj = ep.calibrate.calibrate_ek.CalibrateEK80(\n", | |
" echodata,\n", | |
" env_params=None,\n", | |
" cal_params=None,\n", | |
" waveform_mode=\"BB\",\n", | |
" encode_mode=\"complex\",\n", | |
")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"id": "f4e398e1", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"beam_group = echodata[\"Sonar/Beam_group1\"]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"id": "39cce73c", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"coeff = ep.calibrate.ek80_complex.get_filter_coeff(\n", | |
" echodata[\"Vendor_specific\"].sel(channel=cal_obj.chan_sel)\n", | |
")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"id": "3975f42e", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The starting data size is 271.2 MB\n" | |
] | |
} | |
], | |
"source": [ | |
"print(f\"The starting data size is {memory_repr(beam_group.nbytes)}\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"id": "513b9517", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Duplicate data across time\n", | |
"br = beam_group\n", | |
"br_list = []\n", | |
"current_br = br\n", | |
"for i in range(20):\n", | |
" if i != 0:\n", | |
" new_br = current_br.copy()\n", | |
" pt_array = current_br[\"ping_time\"].data\n", | |
" end_time = pt_array[-1] + (pt_array[-1] - pt_array[0])\n", | |
" ping_times = pd.date_range(start=pt_array[-1] + np.timedelta64(1, \"s\"), end=end_time, periods=pt_array.size)\n", | |
" \n", | |
" new_br[\"ping_time\"] = ping_times\n", | |
" current_br = new_br\n", | |
" br_list.append(current_br)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"id": "d8dd18b8", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"beam = xr.concat(br_list, dim=\"ping_time\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"id": "7695b980", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Expanded data size is 5.3 GB\n" | |
] | |
} | |
], | |
"source": [ | |
"print(f\"Expanded data size is {memory_repr(beam.nbytes)}\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"id": "9a35ceaa", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"chirp, _ = ep.calibrate.ek80_complex.get_transmit_signal(\n", | |
" beam_group,\n", | |
" coeff,\n", | |
" \"BB\",\n", | |
" cal_obj.cal_params[\"receiver_sampling_frequency\"],\n", | |
")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"id": "3d85b2ac", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<xarray.backends.zarr.ZarrStore at 0x137584ac0>" | |
] | |
}, | |
"execution_count": 12, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# Chunk the data along ping time and save to zarr\n", | |
"beam.chunk({\"ping_time\": 100}).to_zarr(\"./test_beam.zarr\", mode=\"w\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"id": "22c62c28", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Reopen the data\n", | |
"delayed_beam = xr.open_dataset(\"./test_beam.zarr\", engine=\"zarr\", chunks={})\n", | |
"eager_beam = xr.open_dataset(\"./test_beam.zarr\", engine=\"zarr\").compute()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 15, | |
"id": "0b475c08", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
"<defs>\n", | |
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"</symbol>\n", | |
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"</symbol>\n", | |
"</defs>\n", | |
"</svg>\n", | |
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
" *\n", | |
" */\n", | |
"\n", | |
":root {\n", | |
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n", | |
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n", | |
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n", | |
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n", | |
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n", | |
" --xr-background-color: var(--jp-layout-color0, white);\n", | |
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n", | |
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n", | |
"}\n", | |
"\n", | |
"html[theme=dark],\n", | |
"body[data-theme=dark],\n", | |
"body.vscode-dark {\n", | |
" --xr-font-color0: rgba(255, 255, 255, 1);\n", | |
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n", | |
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n", | |
" --xr-border-color: #1F1F1F;\n", | |
" --xr-disabled-color: #515151;\n", | |
" --xr-background-color: #111111;\n", | |
" --xr-background-color-row-even: #111111;\n", | |
" --xr-background-color-row-odd: #313131;\n", | |
"}\n", | |
"\n", | |
".xr-wrap {\n", | |
" display: block !important;\n", | |
" min-width: 300px;\n", | |
" max-width: 700px;\n", | |
"}\n", | |
"\n", | |
".xr-text-repr-fallback {\n", | |
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-header {\n", | |
" padding-top: 6px;\n", | |
" padding-bottom: 6px;\n", | |
" margin-bottom: 4px;\n", | |
" border-bottom: solid 1px var(--xr-border-color);\n", | |
"}\n", | |
"\n", | |
".xr-header > div,\n", | |
".xr-header > ul {\n", | |
" display: inline;\n", | |
" margin-top: 0;\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type,\n", | |
".xr-array-name {\n", | |
" margin-left: 2px;\n", | |
" margin-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-sections {\n", | |
" padding-left: 0 !important;\n", | |
" display: grid;\n", | |
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n", | |
"}\n", | |
"\n", | |
".xr-section-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input + label {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label {\n", | |
" cursor: pointer;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label:hover {\n", | |
" color: var(--xr-font-color0);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary {\n", | |
" grid-column: 1;\n", | |
" color: var(--xr-font-color2);\n", | |
" font-weight: 500;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary > span {\n", | |
" display: inline-block;\n", | |
" padding-left: 0.5em;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in + label:before {\n", | |
" display: inline-block;\n", | |
" content: '►';\n", | |
" font-size: 11px;\n", | |
" width: 15px;\n", | |
" text-align: center;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label:before {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label:before {\n", | |
" content: '▼';\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label > span {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary,\n", | |
".xr-section-inline-details {\n", | |
" padding-top: 4px;\n", | |
" padding-bottom: 4px;\n", | |
"}\n", | |
"\n", | |
".xr-section-inline-details {\n", | |
" grid-column: 2 / -1;\n", | |
"}\n", | |
"\n", | |
".xr-section-details {\n", | |
" display: none;\n", | |
" grid-column: 1 / -1;\n", | |
" margin-bottom: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap {\n", | |
" grid-column: 1 / -1;\n", | |
" display: grid;\n", | |
" grid-template-columns: 20px auto;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap > label {\n", | |
" grid-column: 1;\n", | |
" vertical-align: top;\n", | |
"}\n", | |
"\n", | |
".xr-preview {\n", | |
" color: var(--xr-font-color3);\n", | |
"}\n", | |
"\n", | |
".xr-array-preview,\n", | |
".xr-array-data {\n", | |
" padding: 0 5px !important;\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-array-data,\n", | |
".xr-array-in:checked ~ .xr-array-preview {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-array-in:checked ~ .xr-array-data,\n", | |
".xr-array-preview {\n", | |
" display: inline-block;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list {\n", | |
" display: inline-block !important;\n", | |
" list-style: none;\n", | |
" padding: 0 !important;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li {\n", | |
" display: inline-block;\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:before {\n", | |
" content: '(';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:after {\n", | |
" content: ')';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li:not(:last-child):after {\n", | |
" content: ',';\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-has-index {\n", | |
" font-weight: bold;\n", | |
"}\n", | |
"\n", | |
".xr-var-list,\n", | |
".xr-var-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > div,\n", | |
".xr-var-item label,\n", | |
".xr-var-item > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-even);\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > .xr-var-name:hover span {\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-var-list > li:nth-child(odd) > div,\n", | |
".xr-var-list > li:nth-child(odd) > label,\n", | |
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-odd);\n", | |
"}\n", | |
"\n", | |
".xr-var-name {\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-dims {\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-var-dtype {\n", | |
" grid-column: 3;\n", | |
" text-align: right;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-var-preview {\n", | |
" grid-column: 4;\n", | |
"}\n", | |
"\n", | |
".xr-index-preview {\n", | |
" grid-column: 2 / 5;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-var-name,\n", | |
".xr-var-dims,\n", | |
".xr-var-dtype,\n", | |
".xr-preview,\n", | |
".xr-attrs dt {\n", | |
" white-space: nowrap;\n", | |
" overflow: hidden;\n", | |
" text-overflow: ellipsis;\n", | |
" padding-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-var-name:hover,\n", | |
".xr-var-dims:hover,\n", | |
".xr-var-dtype:hover,\n", | |
".xr-attrs dt:hover {\n", | |
" overflow: visible;\n", | |
" width: auto;\n", | |
" z-index: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs,\n", | |
".xr-var-data,\n", | |
".xr-index-data {\n", | |
" display: none;\n", | |
" background-color: var(--xr-background-color) !important;\n", | |
" padding-bottom: 5px !important;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
".xr-var-data-in:checked ~ .xr-var-data,\n", | |
".xr-index-data-in:checked ~ .xr-index-data {\n", | |
" display: block;\n", | |
"}\n", | |
"\n", | |
".xr-var-data > table {\n", | |
" float: right;\n", | |
"}\n", | |
"\n", | |
".xr-var-name span,\n", | |
".xr-var-data,\n", | |
".xr-index-name div,\n", | |
".xr-index-data,\n", | |
".xr-attrs {\n", | |
" padding-left: 25px !important;\n", | |
"}\n", | |
"\n", | |
".xr-attrs,\n", | |
".xr-var-attrs,\n", | |
".xr-var-data,\n", | |
".xr-index-data {\n", | |
" grid-column: 1 / -1;\n", | |
"}\n", | |
"\n", | |
"dl.xr-attrs {\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
" display: grid;\n", | |
" grid-template-columns: 125px auto;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt,\n", | |
".xr-attrs dd {\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
" float: left;\n", | |
" padding-right: 10px;\n", | |
" width: auto;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt {\n", | |
" font-weight: normal;\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt:hover span {\n", | |
" display: inline-block;\n", | |
" background: var(--xr-background-color);\n", | |
" padding-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dd {\n", | |
" grid-column: 2;\n", | |
" white-space: pre-wrap;\n", | |
" word-break: break-all;\n", | |
"}\n", | |
"\n", | |
".xr-icon-database,\n", | |
".xr-icon-file-text2,\n", | |
".xr-no-icon {\n", | |
" display: inline-block;\n", | |
" vertical-align: middle;\n", | |
" width: 1em;\n", | |
" height: 1.5em !important;\n", | |
" stroke-width: 0;\n", | |
" stroke: currentColor;\n", | |
" fill: currentColor;\n", | |
"}\n", | |
"</style><pre class='xr-text-repr-fallback'><xarray.DataArray 'backscatter_r' (channel: 2, ping_time: 1760,\n", | |
" range_sample: 25229, beam: 4)>\n", | |
"dask.array<open_dataset-backscatter_r, shape=(2, 1760, 25229, 4), dtype=float64, chunksize=(2, 100, 25229, 4), chunktype=numpy.ndarray>\n", | |
"Coordinates:\n", | |
" * beam (beam) <U21 '1' '2' '3' '4'\n", | |
" * channel (channel) <U22 'WBT 545612-15 ES200-7C' 'WBT 549762-15 ES70...\n", | |
" * ping_time (ping_time) datetime64[ns] 2017-09-12T23:49:10.723866112 .....\n", | |
" * range_sample (range_sample) int64 0 1 2 3 4 ... 25225 25226 25227 25228\n", | |
"Attributes:\n", | |
" long_name: Raw backscatter measurements (real part)\n", | |
" units: dB</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'backscatter_r'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>channel</span>: 2</li><li><span class='xr-has-index'>ping_time</span>: 1760</li><li><span class='xr-has-index'>range_sample</span>: 25229</li><li><span class='xr-has-index'>beam</span>: 4</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-9fb3a713-d72f-4c63-aabc-c4e702b89df7' class='xr-array-in' type='checkbox' checked><label for='section-9fb3a713-d72f-4c63-aabc-c4e702b89df7' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>dask.array<chunksize=(2, 100, 25229, 4), meta=np.ndarray></span></div><div class='xr-array-data'><table>\n", | |
" <tr>\n", | |
" <td>\n", | |
" <table style=\"border-collapse: collapse;\">\n", | |
" <thead>\n", | |
" <tr>\n", | |
" <td> </td>\n", | |
" <th> Array </th>\n", | |
" <th> Chunk </th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" \n", | |
" <tr>\n", | |
" <th> Bytes </th>\n", | |
" <td> 2.65 GiB </td>\n", | |
" <td> 153.99 MiB </td>\n", | |
" </tr>\n", | |
" \n", | |
" <tr>\n", | |
" <th> Shape </th>\n", | |
" <td> (2, 1760, 25229, 4) </td>\n", | |
" <td> (2, 100, 25229, 4) </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th> Dask graph </th>\n", | |
" <td colspan=\"2\"> 18 chunks in 2 graph layers </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th> Data type </th>\n", | |
" <td colspan=\"2\"> float64 numpy.ndarray </td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
" </table>\n", | |
" </td>\n", | |
" <td>\n", | |
" <svg width=\"286\" height=\"191\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"25\" y2=\"0\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"0\" y1=\"25\" x2=\"25\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"25\" y1=\"0\" x2=\"25\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"0.0,0.0 25.412616514582485,0.0 25.412616514582485,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Text -->\n", | |
" <text x=\"12.706308\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >2</text>\n", | |
" <text x=\"45.412617\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,45.412617,12.706308)\">1</text>\n", | |
"\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"95\" y1=\"0\" x2=\"116\" y2=\"21\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"95\" y1=\"120\" x2=\"116\" y2=\"141\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"95\" y1=\"0\" x2=\"95\" y2=\"120\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"96\" y1=\"1\" x2=\"96\" y2=\"121\" />\n", | |
" <line x1=\"97\" y1=\"2\" x2=\"97\" y2=\"122\" />\n", | |
" <line x1=\"98\" y1=\"3\" x2=\"98\" y2=\"123\" />\n", | |
" <line x1=\"99\" y1=\"4\" x2=\"99\" y2=\"124\" />\n", | |
" <line x1=\"101\" y1=\"6\" x2=\"101\" y2=\"126\" />\n", | |
" <line x1=\"102\" y1=\"7\" x2=\"102\" y2=\"127\" />\n", | |
" <line x1=\"103\" y1=\"8\" x2=\"103\" y2=\"128\" />\n", | |
" <line x1=\"104\" y1=\"9\" x2=\"104\" y2=\"129\" />\n", | |
" <line x1=\"105\" y1=\"10\" x2=\"105\" y2=\"130\" />\n", | |
" <line x1=\"107\" y1=\"12\" x2=\"107\" y2=\"132\" />\n", | |
" <line x1=\"108\" y1=\"13\" x2=\"108\" y2=\"133\" />\n", | |
" <line x1=\"109\" y1=\"14\" x2=\"109\" y2=\"134\" />\n", | |
" <line x1=\"110\" y1=\"15\" x2=\"110\" y2=\"135\" />\n", | |
" <line x1=\"112\" y1=\"17\" x2=\"112\" y2=\"137\" />\n", | |
" <line x1=\"113\" y1=\"18\" x2=\"113\" y2=\"138\" />\n", | |
" <line x1=\"114\" y1=\"19\" x2=\"114\" y2=\"139\" />\n", | |
" <line x1=\"115\" y1=\"20\" x2=\"115\" y2=\"140\" />\n", | |
" <line x1=\"116\" y1=\"21\" x2=\"116\" y2=\"141\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"95.0,0.0 116.4817641558567,21.481764155856688 116.4817641558567,141.4817641558567 95.0,120.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"95\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"96\" y1=\"1\" x2=\"121\" y2=\"1\" />\n", | |
" <line x1=\"97\" y1=\"2\" x2=\"122\" y2=\"2\" />\n", | |
" <line x1=\"98\" y1=\"3\" x2=\"124\" y2=\"3\" />\n", | |
" <line x1=\"99\" y1=\"4\" x2=\"125\" y2=\"4\" />\n", | |
" <line x1=\"101\" y1=\"6\" x2=\"126\" y2=\"6\" />\n", | |
" <line x1=\"102\" y1=\"7\" x2=\"127\" y2=\"7\" />\n", | |
" <line x1=\"103\" y1=\"8\" x2=\"128\" y2=\"8\" />\n", | |
" <line x1=\"104\" y1=\"9\" x2=\"130\" y2=\"9\" />\n", | |
" <line x1=\"105\" y1=\"10\" x2=\"131\" y2=\"10\" />\n", | |
" <line x1=\"107\" y1=\"12\" x2=\"132\" y2=\"12\" />\n", | |
" <line x1=\"108\" y1=\"13\" x2=\"133\" y2=\"13\" />\n", | |
" <line x1=\"109\" y1=\"14\" x2=\"135\" y2=\"14\" />\n", | |
" <line x1=\"110\" y1=\"15\" x2=\"136\" y2=\"15\" />\n", | |
" <line x1=\"112\" y1=\"17\" x2=\"137\" y2=\"17\" />\n", | |
" <line x1=\"113\" y1=\"18\" x2=\"138\" y2=\"18\" />\n", | |
" <line x1=\"114\" y1=\"19\" x2=\"139\" y2=\"19\" />\n", | |
" <line x1=\"115\" y1=\"20\" x2=\"141\" y2=\"20\" />\n", | |
" <line x1=\"116\" y1=\"21\" x2=\"141\" y2=\"21\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"95\" y1=\"0\" x2=\"116\" y2=\"21\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"120\" y1=\"0\" x2=\"141\" y2=\"21\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"95.0,0.0 120.41261651458248,0.0 141.89438067043918,21.481764155856688 116.4817641558567,21.481764155856688\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"116\" y1=\"21\" x2=\"141\" y2=\"21\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"116\" y1=\"141\" x2=\"141\" y2=\"141\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"116\" y1=\"21\" x2=\"116\" y2=\"141\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"141\" y1=\"21\" x2=\"141\" y2=\"141\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"116.4817641558567,21.481764155856688 141.89438067043918,21.481764155856688 141.89438067043918,141.4817641558567 116.4817641558567,141.4817641558567\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Text -->\n", | |
" <text x=\"129.188072\" y=\"161.481764\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >4</text>\n", | |
" <text x=\"161.894381\" y=\"81.481764\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,161.894381,81.481764)\">25229</text>\n", | |
" <text x=\"95.740882\" y=\"150.740882\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,95.740882,150.740882)\">1760</text>\n", | |
"</svg>\n", | |
" </td>\n", | |
" </tr>\n", | |
"</table></div></div></li><li class='xr-section-item'><input id='section-3aa241ab-46d9-49e4-ab10-336d8ac92c84' class='xr-section-summary-in' type='checkbox' checked><label for='section-3aa241ab-46d9-49e4-ab10-336d8ac92c84' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>beam</span></div><div class='xr-var-dims'>(beam)</div><div class='xr-var-dtype'><U21</div><div class='xr-var-preview xr-preview'>'1' '2' '3' '4'</div><input id='attrs-94ea2ef9-5bc8-4d55-a815-3e17a7bb3fc0' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-94ea2ef9-5bc8-4d55-a815-3e17a7bb3fc0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7660068a-c1ee-46f2-a16f-a6808f4c6aa0' class='xr-var-data-in' type='checkbox'><label for='data-7660068a-c1ee-46f2-a16f-a6808f4c6aa0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Beam name</dd></dl></div><div class='xr-var-data'><pre>array(['1', '2', '3', '4'], dtype='<U21')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>channel</span></div><div class='xr-var-dims'>(channel)</div><div class='xr-var-dtype'><U22</div><div class='xr-var-preview xr-preview'>'WBT 545612-15 ES200-7C' 'WBT 54...</div><input id='attrs-b0902791-7afc-4094-b425-8fe2ddc19c59' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-b0902791-7afc-4094-b425-8fe2ddc19c59' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ee3f979b-6489-41d7-9907-8c00b1928e02' class='xr-var-data-in' type='checkbox'><label for='data-ee3f979b-6489-41d7-9907-8c00b1928e02' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Vendor channel ID</dd></dl></div><div class='xr-var-data'><pre>array(['WBT 545612-15 ES200-7C', 'WBT 549762-15 ES70-7C'], dtype='<U22')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>ping_time</span></div><div class='xr-var-dims'>(ping_time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2017-09-12T23:49:10.723866112 .....</div><input id='attrs-2c54b789-67f4-4545-af5f-ac1f1f1003a4' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-2c54b789-67f4-4545-af5f-ac1f1f1003a4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3ed34c64-6a3d-41b6-a42e-af99022fd953' class='xr-var-data-in' type='checkbox'><label for='data-3ed34c64-6a3d-41b6-a42e-af99022fd953' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>axis :</span></dt><dd>T</dd><dt><span>long_name :</span></dt><dd>Timestamp of each ping</dd><dt><span>standard_name :</span></dt><dd>time</dd></dl></div><div class='xr-var-data'><pre>array(['2017-09-12T23:49:10.723866112', '2017-09-12T23:49:12.253952000',\n", | |
" '2017-09-12T23:49:13.043997184', ..., '2017-09-13T00:09:33.616883712',\n", | |
" '2017-09-13T00:09:34.200251392', '2017-09-13T00:09:34.783619072'],\n", | |
" dtype='datetime64[ns]')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>range_sample</span></div><div class='xr-var-dims'>(range_sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 ... 25225 25226 25227 25228</div><input id='attrs-8f054263-2df1-4330-9a4f-f6c42e9637e3' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-8f054263-2df1-4330-9a4f-f6c42e9637e3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-377567ef-4b48-4201-a63c-6e4c4f6f2677' class='xr-var-data-in' type='checkbox'><label for='data-377567ef-4b48-4201-a63c-6e4c4f6f2677' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Along-range sample number, base 0</dd></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, ..., 25226, 25227, 25228])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ccf339af-2ba7-42e6-a278-688e7fc15ce5' class='xr-section-summary-in' type='checkbox' ><label for='section-ccf339af-2ba7-42e6-a278-688e7fc15ce5' class='xr-section-summary' >Indexes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>beam</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-a438d462-3e73-4205-a7de-522cd0c88e91' class='xr-index-data-in' type='checkbox'/><label for='index-a438d462-3e73-4205-a7de-522cd0c88e91' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index(['1', '2', '3', '4'], dtype='object', name='beam'))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>channel</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-75d538c1-2071-41a3-b64c-dd955aa5514d' class='xr-index-data-in' type='checkbox'/><label for='index-75d538c1-2071-41a3-b64c-dd955aa5514d' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index(['WBT 545612-15 ES200-7C', 'WBT 549762-15 ES70-7C'], dtype='object', name='channel'))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>ping_time</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-8a4a559a-fee1-40a7-a11b-88eb93546d10' class='xr-index-data-in' type='checkbox'/><label for='index-8a4a559a-fee1-40a7-a11b-88eb93546d10' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex(['2017-09-12 23:49:10.723866112',\n", | |
" '2017-09-12 23:49:12.253952',\n", | |
" '2017-09-12 23:49:13.043997184',\n", | |
" '2017-09-12 23:49:13.834043904',\n", | |
" '2017-09-12 23:49:14.625088',\n", | |
" '2017-09-12 23:49:15.405131776',\n", | |
" '2017-09-12 23:49:16.195176960',\n", | |
" '2017-09-12 23:49:16.995224064',\n", | |
" '2017-09-12 23:49:17.784266752',\n", | |
" '2017-09-12 23:49:18.565313024',\n", | |
" ...\n", | |
" '2017-09-13 00:09:29.533309952',\n", | |
" '2017-09-13 00:09:30.116677632',\n", | |
" '2017-09-13 00:09:30.700045312',\n", | |
" '2017-09-13 00:09:31.283412992',\n", | |
" '2017-09-13 00:09:31.866780672',\n", | |
" '2017-09-13 00:09:32.450148352',\n", | |
" '2017-09-13 00:09:33.033516032',\n", | |
" '2017-09-13 00:09:33.616883712',\n", | |
" '2017-09-13 00:09:34.200251392',\n", | |
" '2017-09-13 00:09:34.783619072'],\n", | |
" dtype='datetime64[ns]', name='ping_time', length=1760, freq=None))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>range_sample</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-b09ad268-4f52-4468-a120-4cb60763dd76' class='xr-index-data-in' type='checkbox'/><label for='index-b09ad268-4f52-4468-a120-4cb60763dd76' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,\n", | |
" ...\n", | |
" 25219, 25220, 25221, 25222, 25223, 25224, 25225, 25226, 25227, 25228],\n", | |
" dtype='int64', name='range_sample', length=25229))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-176666c0-7f06-43cd-942e-1d87741d29f7' class='xr-section-summary-in' type='checkbox' checked><label for='section-176666c0-7f06-43cd-942e-1d87741d29f7' class='xr-section-summary' >Attributes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Raw backscatter measurements (real part)</dd><dt><span>units :</span></dt><dd>dB</dd></dl></div></li></ul></div></div>" | |
], | |
"text/plain": [ | |
"<xarray.DataArray 'backscatter_r' (channel: 2, ping_time: 1760,\n", | |
" range_sample: 25229, beam: 4)>\n", | |
"dask.array<open_dataset-backscatter_r, shape=(2, 1760, 25229, 4), dtype=float64, chunksize=(2, 100, 25229, 4), chunktype=numpy.ndarray>\n", | |
"Coordinates:\n", | |
" * beam (beam) <U21 '1' '2' '3' '4'\n", | |
" * channel (channel) <U22 'WBT 545612-15 ES200-7C' 'WBT 549762-15 ES70...\n", | |
" * ping_time (ping_time) datetime64[ns] 2017-09-12T23:49:10.723866112 .....\n", | |
" * range_sample (range_sample) int64 0 1 2 3 4 ... 25225 25226 25227 25228\n", | |
"Attributes:\n", | |
" long_name: Raw backscatter measurements (real part)\n", | |
" units: dB" | |
] | |
}, | |
"execution_count": 15, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# Delayed backscatter\n", | |
"delayed_beam[\"backscatter_r\"]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 16, | |
"id": "ec9bc509", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
"<defs>\n", | |
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"</symbol>\n", | |
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"</symbol>\n", | |
"</defs>\n", | |
"</svg>\n", | |
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
" *\n", | |
" */\n", | |
"\n", | |
":root {\n", | |
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n", | |
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n", | |
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n", | |
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n", | |
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n", | |
" --xr-background-color: var(--jp-layout-color0, white);\n", | |
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n", | |
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n", | |
"}\n", | |
"\n", | |
"html[theme=dark],\n", | |
"body[data-theme=dark],\n", | |
"body.vscode-dark {\n", | |
" --xr-font-color0: rgba(255, 255, 255, 1);\n", | |
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n", | |
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n", | |
" --xr-border-color: #1F1F1F;\n", | |
" --xr-disabled-color: #515151;\n", | |
" --xr-background-color: #111111;\n", | |
" --xr-background-color-row-even: #111111;\n", | |
" --xr-background-color-row-odd: #313131;\n", | |
"}\n", | |
"\n", | |
".xr-wrap {\n", | |
" display: block !important;\n", | |
" min-width: 300px;\n", | |
" max-width: 700px;\n", | |
"}\n", | |
"\n", | |
".xr-text-repr-fallback {\n", | |
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-header {\n", | |
" padding-top: 6px;\n", | |
" padding-bottom: 6px;\n", | |
" margin-bottom: 4px;\n", | |
" border-bottom: solid 1px var(--xr-border-color);\n", | |
"}\n", | |
"\n", | |
".xr-header > div,\n", | |
".xr-header > ul {\n", | |
" display: inline;\n", | |
" margin-top: 0;\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type,\n", | |
".xr-array-name {\n", | |
" margin-left: 2px;\n", | |
" margin-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-sections {\n", | |
" padding-left: 0 !important;\n", | |
" display: grid;\n", | |
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n", | |
"}\n", | |
"\n", | |
".xr-section-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input + label {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label {\n", | |
" cursor: pointer;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label:hover {\n", | |
" color: var(--xr-font-color0);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary {\n", | |
" grid-column: 1;\n", | |
" color: var(--xr-font-color2);\n", | |
" font-weight: 500;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary > span {\n", | |
" display: inline-block;\n", | |
" padding-left: 0.5em;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in + label:before {\n", | |
" display: inline-block;\n", | |
" content: '►';\n", | |
" font-size: 11px;\n", | |
" width: 15px;\n", | |
" text-align: center;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label:before {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label:before {\n", | |
" content: '▼';\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label > span {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary,\n", | |
".xr-section-inline-details {\n", | |
" padding-top: 4px;\n", | |
" padding-bottom: 4px;\n", | |
"}\n", | |
"\n", | |
".xr-section-inline-details {\n", | |
" grid-column: 2 / -1;\n", | |
"}\n", | |
"\n", | |
".xr-section-details {\n", | |
" display: none;\n", | |
" grid-column: 1 / -1;\n", | |
" margin-bottom: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap {\n", | |
" grid-column: 1 / -1;\n", | |
" display: grid;\n", | |
" grid-template-columns: 20px auto;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap > label {\n", | |
" grid-column: 1;\n", | |
" vertical-align: top;\n", | |
"}\n", | |
"\n", | |
".xr-preview {\n", | |
" color: var(--xr-font-color3);\n", | |
"}\n", | |
"\n", | |
".xr-array-preview,\n", | |
".xr-array-data {\n", | |
" padding: 0 5px !important;\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-array-data,\n", | |
".xr-array-in:checked ~ .xr-array-preview {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-array-in:checked ~ .xr-array-data,\n", | |
".xr-array-preview {\n", | |
" display: inline-block;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list {\n", | |
" display: inline-block !important;\n", | |
" list-style: none;\n", | |
" padding: 0 !important;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li {\n", | |
" display: inline-block;\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:before {\n", | |
" content: '(';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:after {\n", | |
" content: ')';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li:not(:last-child):after {\n", | |
" content: ',';\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-has-index {\n", | |
" font-weight: bold;\n", | |
"}\n", | |
"\n", | |
".xr-var-list,\n", | |
".xr-var-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > div,\n", | |
".xr-var-item label,\n", | |
".xr-var-item > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-even);\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > .xr-var-name:hover span {\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-var-list > li:nth-child(odd) > div,\n", | |
".xr-var-list > li:nth-child(odd) > label,\n", | |
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-odd);\n", | |
"}\n", | |
"\n", | |
".xr-var-name {\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-dims {\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-var-dtype {\n", | |
" grid-column: 3;\n", | |
" text-align: right;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-var-preview {\n", | |
" grid-column: 4;\n", | |
"}\n", | |
"\n", | |
".xr-index-preview {\n", | |
" grid-column: 2 / 5;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-var-name,\n", | |
".xr-var-dims,\n", | |
".xr-var-dtype,\n", | |
".xr-preview,\n", | |
".xr-attrs dt {\n", | |
" white-space: nowrap;\n", | |
" overflow: hidden;\n", | |
" text-overflow: ellipsis;\n", | |
" padding-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-var-name:hover,\n", | |
".xr-var-dims:hover,\n", | |
".xr-var-dtype:hover,\n", | |
".xr-attrs dt:hover {\n", | |
" overflow: visible;\n", | |
" width: auto;\n", | |
" z-index: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs,\n", | |
".xr-var-data,\n", | |
".xr-index-data {\n", | |
" display: none;\n", | |
" background-color: var(--xr-background-color) !important;\n", | |
" padding-bottom: 5px !important;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
".xr-var-data-in:checked ~ .xr-var-data,\n", | |
".xr-index-data-in:checked ~ .xr-index-data {\n", | |
" display: block;\n", | |
"}\n", | |
"\n", | |
".xr-var-data > table {\n", | |
" float: right;\n", | |
"}\n", | |
"\n", | |
".xr-var-name span,\n", | |
".xr-var-data,\n", | |
".xr-index-name div,\n", | |
".xr-index-data,\n", | |
".xr-attrs {\n", | |
" padding-left: 25px !important;\n", | |
"}\n", | |
"\n", | |
".xr-attrs,\n", | |
".xr-var-attrs,\n", | |
".xr-var-data,\n", | |
".xr-index-data {\n", | |
" grid-column: 1 / -1;\n", | |
"}\n", | |
"\n", | |
"dl.xr-attrs {\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
" display: grid;\n", | |
" grid-template-columns: 125px auto;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt,\n", | |
".xr-attrs dd {\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
" float: left;\n", | |
" padding-right: 10px;\n", | |
" width: auto;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt {\n", | |
" font-weight: normal;\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt:hover span {\n", | |
" display: inline-block;\n", | |
" background: var(--xr-background-color);\n", | |
" padding-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dd {\n", | |
" grid-column: 2;\n", | |
" white-space: pre-wrap;\n", | |
" word-break: break-all;\n", | |
"}\n", | |
"\n", | |
".xr-icon-database,\n", | |
".xr-icon-file-text2,\n", | |
".xr-no-icon {\n", | |
" display: inline-block;\n", | |
" vertical-align: middle;\n", | |
" width: 1em;\n", | |
" height: 1.5em !important;\n", | |
" stroke-width: 0;\n", | |
" stroke: currentColor;\n", | |
" fill: currentColor;\n", | |
"}\n", | |
"</style><pre class='xr-text-repr-fallback'><xarray.DataArray 'backscatter_r' (channel: 2, ping_time: 1760,\n", | |
" range_sample: 25229, beam: 4)>\n", | |
"array([[[[-9.58796591e-07, -2.39721089e-07, 4.79425580e-07,\n", | |
" -9.58875717e-07],\n", | |
" [-8.59507873e-06, 9.31027898e-06, 4.05911578e-06,\n", | |
" 4.53602161e-06],\n", | |
" [ 6.08467526e-05, -6.30426221e-05, -2.43436643e-05,\n", | |
" 2.94696711e-05],\n", | |
" ...,\n", | |
" [-2.61083210e-06, 1.64820699e-06, 4.77494768e-06,\n", | |
" 1.31667309e-06],\n", | |
" [-1.34275308e-06, -7.68232098e-07, 1.00862853e-05,\n", | |
" -1.48054335e-06],\n", | |
" [ 2.66295001e-06, 2.07455537e-06, 9.46026921e-06,\n", | |
" -1.29056127e-06]],\n", | |
"\n", | |
" [[-9.55151336e-07, -6.69650763e-06, 2.38717485e-06,\n", | |
" 9.58907890e-07],\n", | |
" [-6.45823002e-06, 1.26482228e-05, -1.67040525e-06,\n", | |
" -1.16946367e-05],\n", | |
" [ 1.53427009e-05, 1.51832559e-04, -1.16686169e-04,\n", | |
" -4.63036013e-05],\n", | |
"...\n", | |
" [ nan, nan, nan,\n", | |
" nan],\n", | |
" [ nan, nan, nan,\n", | |
" nan],\n", | |
" [ nan, nan, nan,\n", | |
" nan]],\n", | |
"\n", | |
" [[ 4.89365175e-06, -6.81580059e-06, 3.34820652e-06,\n", | |
" 2.38717803e-06],\n", | |
" [-6.24527340e-04, -5.02450101e-04, -3.92370159e-04,\n", | |
" -4.30517393e-04],\n", | |
" [-4.93536610e-03, -4.75223456e-03, -3.30690970e-03,\n", | |
" -3.03224684e-03],\n", | |
" ...,\n", | |
" [ nan, nan, nan,\n", | |
" nan],\n", | |
" [ nan, nan, nan,\n", | |
" nan],\n", | |
" [ nan, nan, nan,\n", | |
" nan]]]])\n", | |
"Coordinates:\n", | |
" * beam (beam) <U21 '1' '2' '3' '4'\n", | |
" * channel (channel) <U22 'WBT 545612-15 ES200-7C' 'WBT 549762-15 ES70...\n", | |
" * ping_time (ping_time) datetime64[ns] 2017-09-12T23:49:10.723866112 .....\n", | |
" * range_sample (range_sample) int64 0 1 2 3 4 ... 25225 25226 25227 25228\n", | |
"Attributes:\n", | |
" long_name: Raw backscatter measurements (real part)\n", | |
" units: dB</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'backscatter_r'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>channel</span>: 2</li><li><span class='xr-has-index'>ping_time</span>: 1760</li><li><span class='xr-has-index'>range_sample</span>: 25229</li><li><span class='xr-has-index'>beam</span>: 4</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-e6f2c8b2-ac37-42b0-bc9e-cff684da465b' class='xr-array-in' type='checkbox' checked><label for='section-e6f2c8b2-ac37-42b0-bc9e-cff684da465b' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>-9.588e-07 -2.397e-07 4.794e-07 -9.589e-07 ... nan nan nan nan</span></div><div class='xr-array-data'><pre>array([[[[-9.58796591e-07, -2.39721089e-07, 4.79425580e-07,\n", | |
" -9.58875717e-07],\n", | |
" [-8.59507873e-06, 9.31027898e-06, 4.05911578e-06,\n", | |
" 4.53602161e-06],\n", | |
" [ 6.08467526e-05, -6.30426221e-05, -2.43436643e-05,\n", | |
" 2.94696711e-05],\n", | |
" ...,\n", | |
" [-2.61083210e-06, 1.64820699e-06, 4.77494768e-06,\n", | |
" 1.31667309e-06],\n", | |
" [-1.34275308e-06, -7.68232098e-07, 1.00862853e-05,\n", | |
" -1.48054335e-06],\n", | |
" [ 2.66295001e-06, 2.07455537e-06, 9.46026921e-06,\n", | |
" -1.29056127e-06]],\n", | |
"\n", | |
" [[-9.55151336e-07, -6.69650763e-06, 2.38717485e-06,\n", | |
" 9.58907890e-07],\n", | |
" [-6.45823002e-06, 1.26482228e-05, -1.67040525e-06,\n", | |
" -1.16946367e-05],\n", | |
" [ 1.53427009e-05, 1.51832559e-04, -1.16686169e-04,\n", | |
" -4.63036013e-05],\n", | |
"...\n", | |
" [ nan, nan, nan,\n", | |
" nan],\n", | |
" [ nan, nan, nan,\n", | |
" nan],\n", | |
" [ nan, nan, nan,\n", | |
" nan]],\n", | |
"\n", | |
" [[ 4.89365175e-06, -6.81580059e-06, 3.34820652e-06,\n", | |
" 2.38717803e-06],\n", | |
" [-6.24527340e-04, -5.02450101e-04, -3.92370159e-04,\n", | |
" -4.30517393e-04],\n", | |
" [-4.93536610e-03, -4.75223456e-03, -3.30690970e-03,\n", | |
" -3.03224684e-03],\n", | |
" ...,\n", | |
" [ nan, nan, nan,\n", | |
" nan],\n", | |
" [ nan, nan, nan,\n", | |
" nan],\n", | |
" [ nan, nan, nan,\n", | |
" nan]]]])</pre></div></div></li><li class='xr-section-item'><input id='section-73addb20-8f6d-4399-80c9-6d0c13b47d4c' class='xr-section-summary-in' type='checkbox' checked><label for='section-73addb20-8f6d-4399-80c9-6d0c13b47d4c' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>beam</span></div><div class='xr-var-dims'>(beam)</div><div class='xr-var-dtype'><U21</div><div class='xr-var-preview xr-preview'>'1' '2' '3' '4'</div><input id='attrs-e95a7084-2b1e-465c-88a7-9347815d8bfb' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-e95a7084-2b1e-465c-88a7-9347815d8bfb' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a1d20953-56f3-4830-b79d-41f70da85bce' class='xr-var-data-in' type='checkbox'><label for='data-a1d20953-56f3-4830-b79d-41f70da85bce' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Beam name</dd></dl></div><div class='xr-var-data'><pre>array(['1', '2', '3', '4'], dtype='<U21')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>channel</span></div><div class='xr-var-dims'>(channel)</div><div class='xr-var-dtype'><U22</div><div class='xr-var-preview xr-preview'>'WBT 545612-15 ES200-7C' 'WBT 54...</div><input id='attrs-2a95f447-a868-459e-bfbe-d57519850974' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-2a95f447-a868-459e-bfbe-d57519850974' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5336d2c0-9390-4663-88b6-def372f40d2b' class='xr-var-data-in' type='checkbox'><label for='data-5336d2c0-9390-4663-88b6-def372f40d2b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Vendor channel ID</dd></dl></div><div class='xr-var-data'><pre>array(['WBT 545612-15 ES200-7C', 'WBT 549762-15 ES70-7C'], dtype='<U22')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>ping_time</span></div><div class='xr-var-dims'>(ping_time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2017-09-12T23:49:10.723866112 .....</div><input id='attrs-ec465ae2-e921-47dd-9767-eadbb4ce57c2' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-ec465ae2-e921-47dd-9767-eadbb4ce57c2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6980aa92-d72d-46a7-aedc-4c2f19f3711d' class='xr-var-data-in' type='checkbox'><label for='data-6980aa92-d72d-46a7-aedc-4c2f19f3711d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>axis :</span></dt><dd>T</dd><dt><span>long_name :</span></dt><dd>Timestamp of each ping</dd><dt><span>standard_name :</span></dt><dd>time</dd></dl></div><div class='xr-var-data'><pre>array(['2017-09-12T23:49:10.723866112', '2017-09-12T23:49:12.253952000',\n", | |
" '2017-09-12T23:49:13.043997184', ..., '2017-09-13T00:09:33.616883712',\n", | |
" '2017-09-13T00:09:34.200251392', '2017-09-13T00:09:34.783619072'],\n", | |
" dtype='datetime64[ns]')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>range_sample</span></div><div class='xr-var-dims'>(range_sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 ... 25225 25226 25227 25228</div><input id='attrs-63b027ad-d1d0-4d1e-9155-c6785a8dce9e' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-63b027ad-d1d0-4d1e-9155-c6785a8dce9e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0beb232d-4ee0-4364-9a62-81aee20e6d73' class='xr-var-data-in' type='checkbox'><label for='data-0beb232d-4ee0-4364-9a62-81aee20e6d73' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Along-range sample number, base 0</dd></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, ..., 25226, 25227, 25228])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ffe05a34-aae5-42a4-ba7f-d8ab39af0623' class='xr-section-summary-in' type='checkbox' ><label for='section-ffe05a34-aae5-42a4-ba7f-d8ab39af0623' class='xr-section-summary' >Indexes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>beam</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-c127820e-6995-4c7b-886c-7d5d89c02db0' class='xr-index-data-in' type='checkbox'/><label for='index-c127820e-6995-4c7b-886c-7d5d89c02db0' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index(['1', '2', '3', '4'], dtype='object', name='beam'))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>channel</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-bf23a52f-b8cd-4aee-ba78-0c6cd8392470' class='xr-index-data-in' type='checkbox'/><label for='index-bf23a52f-b8cd-4aee-ba78-0c6cd8392470' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index(['WBT 545612-15 ES200-7C', 'WBT 549762-15 ES70-7C'], dtype='object', name='channel'))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>ping_time</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-3aea9a4a-d77a-4743-97f6-3ecc3e23c28b' class='xr-index-data-in' type='checkbox'/><label for='index-3aea9a4a-d77a-4743-97f6-3ecc3e23c28b' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex(['2017-09-12 23:49:10.723866112',\n", | |
" '2017-09-12 23:49:12.253952',\n", | |
" '2017-09-12 23:49:13.043997184',\n", | |
" '2017-09-12 23:49:13.834043904',\n", | |
" '2017-09-12 23:49:14.625088',\n", | |
" '2017-09-12 23:49:15.405131776',\n", | |
" '2017-09-12 23:49:16.195176960',\n", | |
" '2017-09-12 23:49:16.995224064',\n", | |
" '2017-09-12 23:49:17.784266752',\n", | |
" '2017-09-12 23:49:18.565313024',\n", | |
" ...\n", | |
" '2017-09-13 00:09:29.533309952',\n", | |
" '2017-09-13 00:09:30.116677632',\n", | |
" '2017-09-13 00:09:30.700045312',\n", | |
" '2017-09-13 00:09:31.283412992',\n", | |
" '2017-09-13 00:09:31.866780672',\n", | |
" '2017-09-13 00:09:32.450148352',\n", | |
" '2017-09-13 00:09:33.033516032',\n", | |
" '2017-09-13 00:09:33.616883712',\n", | |
" '2017-09-13 00:09:34.200251392',\n", | |
" '2017-09-13 00:09:34.783619072'],\n", | |
" dtype='datetime64[ns]', name='ping_time', length=1760, freq=None))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>range_sample</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-d5b7a53a-a401-48b6-86c0-6e68a877e146' class='xr-index-data-in' type='checkbox'/><label for='index-d5b7a53a-a401-48b6-86c0-6e68a877e146' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,\n", | |
" ...\n", | |
" 25219, 25220, 25221, 25222, 25223, 25224, 25225, 25226, 25227, 25228],\n", | |
" dtype='int64', name='range_sample', length=25229))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-cf2fa437-2f49-484f-a0cc-e4b733946813' class='xr-section-summary-in' type='checkbox' checked><label for='section-cf2fa437-2f49-484f-a0cc-e4b733946813' class='xr-section-summary' >Attributes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Raw backscatter measurements (real part)</dd><dt><span>units :</span></dt><dd>dB</dd></dl></div></li></ul></div></div>" | |
], | |
"text/plain": [ | |
"<xarray.DataArray 'backscatter_r' (channel: 2, ping_time: 1760,\n", | |
" range_sample: 25229, beam: 4)>\n", | |
"array([[[[-9.58796591e-07, -2.39721089e-07, 4.79425580e-07,\n", | |
" -9.58875717e-07],\n", | |
" [-8.59507873e-06, 9.31027898e-06, 4.05911578e-06,\n", | |
" 4.53602161e-06],\n", | |
" [ 6.08467526e-05, -6.30426221e-05, -2.43436643e-05,\n", | |
" 2.94696711e-05],\n", | |
" ...,\n", | |
" [-2.61083210e-06, 1.64820699e-06, 4.77494768e-06,\n", | |
" 1.31667309e-06],\n", | |
" [-1.34275308e-06, -7.68232098e-07, 1.00862853e-05,\n", | |
" -1.48054335e-06],\n", | |
" [ 2.66295001e-06, 2.07455537e-06, 9.46026921e-06,\n", | |
" -1.29056127e-06]],\n", | |
"\n", | |
" [[-9.55151336e-07, -6.69650763e-06, 2.38717485e-06,\n", | |
" 9.58907890e-07],\n", | |
" [-6.45823002e-06, 1.26482228e-05, -1.67040525e-06,\n", | |
" -1.16946367e-05],\n", | |
" [ 1.53427009e-05, 1.51832559e-04, -1.16686169e-04,\n", | |
" -4.63036013e-05],\n", | |
"...\n", | |
" [ nan, nan, nan,\n", | |
" nan],\n", | |
" [ nan, nan, nan,\n", | |
" nan],\n", | |
" [ nan, nan, nan,\n", | |
" nan]],\n", | |
"\n", | |
" [[ 4.89365175e-06, -6.81580059e-06, 3.34820652e-06,\n", | |
" 2.38717803e-06],\n", | |
" [-6.24527340e-04, -5.02450101e-04, -3.92370159e-04,\n", | |
" -4.30517393e-04],\n", | |
" [-4.93536610e-03, -4.75223456e-03, -3.30690970e-03,\n", | |
" -3.03224684e-03],\n", | |
" ...,\n", | |
" [ nan, nan, nan,\n", | |
" nan],\n", | |
" [ nan, nan, nan,\n", | |
" nan],\n", | |
" [ nan, nan, nan,\n", | |
" nan]]]])\n", | |
"Coordinates:\n", | |
" * beam (beam) <U21 '1' '2' '3' '4'\n", | |
" * channel (channel) <U22 'WBT 545612-15 ES200-7C' 'WBT 549762-15 ES70...\n", | |
" * ping_time (ping_time) datetime64[ns] 2017-09-12T23:49:10.723866112 .....\n", | |
" * range_sample (range_sample) int64 0 1 2 3 4 ... 25225 25226 25227 25228\n", | |
"Attributes:\n", | |
" long_name: Raw backscatter measurements (real part)\n", | |
" units: dB" | |
] | |
}, | |
"execution_count": 16, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# Eager backscatter\n", | |
"eager_beam[\"backscatter_r\"]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 17, | |
"id": "69dedfac", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\"> </div>\n", | |
" <div style=\"margin-left: 48px;\">\n", | |
" <h3 style=\"margin-bottom: 0px;\">Client</h3>\n", | |
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-cf70057e-9ba1-11ee-b06e-92ed45d179aa</p>\n", | |
" <table style=\"width: 100%; text-align: left;\">\n", | |
"\n", | |
" <tr>\n", | |
" \n", | |
" <td style=\"text-align: left;\"><strong>Connection method:</strong> Cluster object</td>\n", | |
" <td style=\"text-align: left;\"><strong>Cluster type:</strong> distributed.LocalCluster</td>\n", | |
" \n", | |
" </tr>\n", | |
"\n", | |
" \n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:8787/status\" target=\"_blank\">http://127.0.0.1:8787/status</a>\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\"></td>\n", | |
" </tr>\n", | |
" \n", | |
"\n", | |
" </table>\n", | |
"\n", | |
" \n", | |
"\n", | |
" \n", | |
" <details>\n", | |
" <summary style=\"margin-bottom: 20px;\"><h3 style=\"display: inline;\">Cluster Info</h3></summary>\n", | |
" <div class=\"jp-RenderedHTMLCommon jp-RenderedHTML jp-mod-trusted jp-OutputArea-output\">\n", | |
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\">\n", | |
" </div>\n", | |
" <div style=\"margin-left: 48px;\">\n", | |
" <h3 style=\"margin-bottom: 0px; margin-top: 0px;\">LocalCluster</h3>\n", | |
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">55aa82ce</p>\n", | |
" <table style=\"width: 100%; text-align: left;\">\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:8787/status\" target=\"_blank\">http://127.0.0.1:8787/status</a>\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Workers:</strong> 5\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Total threads:</strong> 10\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Total memory:</strong> 32.00 GiB\n", | |
" </td>\n", | |
" </tr>\n", | |
" \n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\"><strong>Status:</strong> running</td>\n", | |
" <td style=\"text-align: left;\"><strong>Using processes:</strong> True</td>\n", | |
"</tr>\n", | |
"\n", | |
" \n", | |
" </table>\n", | |
"\n", | |
" <details>\n", | |
" <summary style=\"margin-bottom: 20px;\">\n", | |
" <h3 style=\"display: inline;\">Scheduler Info</h3>\n", | |
" </summary>\n", | |
"\n", | |
" <div style=\"\">\n", | |
" <div>\n", | |
" <div style=\"width: 24px; height: 24px; background-color: #FFF7E5; border: 3px solid #FF6132; border-radius: 5px; position: absolute;\"> </div>\n", | |
" <div style=\"margin-left: 48px;\">\n", | |
" <h3 style=\"margin-bottom: 0px;\">Scheduler</h3>\n", | |
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Scheduler-c59e4b63-c809-4ecd-8209-c4f8493ceddd</p>\n", | |
" <table style=\"width: 100%; text-align: left;\">\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Comm:</strong> tcp://127.0.0.1:61659\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Workers:</strong> 5\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:8787/status\" target=\"_blank\">http://127.0.0.1:8787/status</a>\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Total threads:</strong> 10\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Started:</strong> Just now\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Total memory:</strong> 32.00 GiB\n", | |
" </td>\n", | |
" </tr>\n", | |
" </table>\n", | |
" </div>\n", | |
" </div>\n", | |
"\n", | |
" <details style=\"margin-left: 48px;\">\n", | |
" <summary style=\"margin-bottom: 20px;\">\n", | |
" <h3 style=\"display: inline;\">Workers</h3>\n", | |
" </summary>\n", | |
"\n", | |
" \n", | |
" <div style=\"margin-bottom: 20px;\">\n", | |
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n", | |
" <div style=\"margin-left: 48px;\">\n", | |
" <details>\n", | |
" <summary>\n", | |
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 0</h4>\n", | |
" </summary>\n", | |
" <table style=\"width: 100%; text-align: left;\">\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Comm: </strong> tcp://127.0.0.1:61676\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Total threads: </strong> 2\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:61680/status\" target=\"_blank\">http://127.0.0.1:61680/status</a>\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Memory: </strong> 6.40 GiB\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Nanny: </strong> tcp://127.0.0.1:61662\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\"></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td colspan=\"2\" style=\"text-align: left;\">\n", | |
" <strong>Local directory: </strong> /var/folders/27/9v53p3fn6v5gn0qdf2ph2s_r0000gn/T/dask-scratch-space/worker-_795l6li\n", | |
" </td>\n", | |
" </tr>\n", | |
"\n", | |
" \n", | |
"\n", | |
" \n", | |
"\n", | |
" </table>\n", | |
" </details>\n", | |
" </div>\n", | |
" </div>\n", | |
" \n", | |
" <div style=\"margin-bottom: 20px;\">\n", | |
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n", | |
" <div style=\"margin-left: 48px;\">\n", | |
" <details>\n", | |
" <summary>\n", | |
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 1</h4>\n", | |
" </summary>\n", | |
" <table style=\"width: 100%; text-align: left;\">\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Comm: </strong> tcp://127.0.0.1:61672\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Total threads: </strong> 2\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:61678/status\" target=\"_blank\">http://127.0.0.1:61678/status</a>\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Memory: </strong> 6.40 GiB\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Nanny: </strong> tcp://127.0.0.1:61663\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\"></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td colspan=\"2\" style=\"text-align: left;\">\n", | |
" <strong>Local directory: </strong> /var/folders/27/9v53p3fn6v5gn0qdf2ph2s_r0000gn/T/dask-scratch-space/worker-uvyskqjh\n", | |
" </td>\n", | |
" </tr>\n", | |
"\n", | |
" \n", | |
"\n", | |
" \n", | |
"\n", | |
" </table>\n", | |
" </details>\n", | |
" </div>\n", | |
" </div>\n", | |
" \n", | |
" <div style=\"margin-bottom: 20px;\">\n", | |
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n", | |
" <div style=\"margin-left: 48px;\">\n", | |
" <details>\n", | |
" <summary>\n", | |
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 2</h4>\n", | |
" </summary>\n", | |
" <table style=\"width: 100%; text-align: left;\">\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Comm: </strong> tcp://127.0.0.1:61675\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Total threads: </strong> 2\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:61679/status\" target=\"_blank\">http://127.0.0.1:61679/status</a>\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Memory: </strong> 6.40 GiB\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Nanny: </strong> tcp://127.0.0.1:61664\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\"></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td colspan=\"2\" style=\"text-align: left;\">\n", | |
" <strong>Local directory: </strong> /var/folders/27/9v53p3fn6v5gn0qdf2ph2s_r0000gn/T/dask-scratch-space/worker-nhr9hou4\n", | |
" </td>\n", | |
" </tr>\n", | |
"\n", | |
" \n", | |
"\n", | |
" \n", | |
"\n", | |
" </table>\n", | |
" </details>\n", | |
" </div>\n", | |
" </div>\n", | |
" \n", | |
" <div style=\"margin-bottom: 20px;\">\n", | |
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n", | |
" <div style=\"margin-left: 48px;\">\n", | |
" <details>\n", | |
" <summary>\n", | |
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 3</h4>\n", | |
" </summary>\n", | |
" <table style=\"width: 100%; text-align: left;\">\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Comm: </strong> tcp://127.0.0.1:61674\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Total threads: </strong> 2\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:61681/status\" target=\"_blank\">http://127.0.0.1:61681/status</a>\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Memory: </strong> 6.40 GiB\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Nanny: </strong> tcp://127.0.0.1:61665\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\"></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td colspan=\"2\" style=\"text-align: left;\">\n", | |
" <strong>Local directory: </strong> /var/folders/27/9v53p3fn6v5gn0qdf2ph2s_r0000gn/T/dask-scratch-space/worker-9c5776xq\n", | |
" </td>\n", | |
" </tr>\n", | |
"\n", | |
" \n", | |
"\n", | |
" \n", | |
"\n", | |
" </table>\n", | |
" </details>\n", | |
" </div>\n", | |
" </div>\n", | |
" \n", | |
" <div style=\"margin-bottom: 20px;\">\n", | |
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n", | |
" <div style=\"margin-left: 48px;\">\n", | |
" <details>\n", | |
" <summary>\n", | |
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 4</h4>\n", | |
" </summary>\n", | |
" <table style=\"width: 100%; text-align: left;\">\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Comm: </strong> tcp://127.0.0.1:61673\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Total threads: </strong> 2\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:61677/status\" target=\"_blank\">http://127.0.0.1:61677/status</a>\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Memory: </strong> 6.40 GiB\n", | |
" </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Nanny: </strong> tcp://127.0.0.1:61666\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\"></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td colspan=\"2\" style=\"text-align: left;\">\n", | |
" <strong>Local directory: </strong> /var/folders/27/9v53p3fn6v5gn0qdf2ph2s_r0000gn/T/dask-scratch-space/worker-w0rd7lnh\n", | |
" </td>\n", | |
" </tr>\n", | |
"\n", | |
" \n", | |
"\n", | |
" \n", | |
"\n", | |
" </table>\n", | |
" </details>\n", | |
" </div>\n", | |
" </div>\n", | |
" \n", | |
"\n", | |
" </details>\n", | |
"</div>\n", | |
"\n", | |
" </details>\n", | |
" </div>\n", | |
"</div>\n", | |
" </details>\n", | |
" \n", | |
"\n", | |
" </div>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
"<Client: 'tcp://127.0.0.1:61659' processes=5 threads=10, memory=32.00 GiB>" | |
] | |
}, | |
"execution_count": 17, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# Setup dask client\n", | |
"from dask.distributed import Client\n", | |
"client = Client()\n", | |
"client" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"id": "d35847e2", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"CPU times: user 47.8 s, sys: 7.11 s, total: 54.9 s\n", | |
"Wall time: 58.1 s\n" | |
] | |
} | |
], | |
"source": [ | |
"%%time\n", | |
"# Eager computation\n", | |
"eager_pc = ep.calibrate.ek80_complex.compress_pulse(\n", | |
" backscatter=eager_beam[\"backscatter_r\"] + 1j * eager_beam[\"backscatter_i\"],\n", | |
" chirp=chirp,\n", | |
")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"id": "bbda6b1e", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"CPU times: user 2.61 s, sys: 3.54 s, total: 6.15 s\n", | |
"Wall time: 24.3 s\n" | |
] | |
} | |
], | |
"source": [ | |
"%%time\n", | |
"# Delayed computation\n", | |
"delayed_pc = ep.calibrate.ek80_complex.compress_pulse(\n", | |
" backscatter=delayed_beam[\"backscatter_r\"] + 1j * delayed_beam[\"backscatter_i\"],\n", | |
" chirp=chirp,\n", | |
")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 22, | |
"id": "bc62ac62", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"True" | |
] | |
}, | |
"execution_count": 22, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# Compare the results\n", | |
"eager_pc.equals(delayed_pc)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"id": "2a767827-604c-4b34-8132-ff36a30cb273", | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "echo310", | |
"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.10.12" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment