Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions notebooks/classify/wradlib_2d_hmc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
"fig = pl.figure(figsize=(8, 7))\n",
"cmap = mpl.cm.viridis\n",
"cgax, im = wrl.vis.plot_rhi(bheight/1000., r=r/1000., th=el, \n",
" cg=True, cmap=cmap,\n",
" proj='cg', cmap=cmap,\n",
" ax=111, fig=fig)\n",
"cbar = pl.colorbar(im, fraction=0.046, pad=0.1)\n",
"cbar.set_label('Height [km]')\n",
Expand Down Expand Up @@ -396,7 +396,7 @@
"source": [
"fig = pl.figure(figsize=(10,5))\n",
"cgax, im = wrl.vis.plot_rhi(rtemp, r=r/1000., th=el, \n",
" cg=True, cmap=cmap,\n",
" proj='cg', cmap=cmap,\n",
" ax=111, fig=fig)\n",
"cbar = pl.colorbar(im, fraction=0.046, pad=0.1)\n",
"cbar.set_label('Temperature [°C]')\n",
Expand Down Expand Up @@ -545,7 +545,7 @@
"for i, c in enumerate(prob):\n",
" cgax, im = wrl.vis.plot_rhi(np.ma.masked_less_equal(c, 0.),\n",
" r=r/1000., th=el,\n",
" cg=True,\n",
" proj='cg',\n",
" ax=gs[i], fig=fig)\n",
" cbar = pl.colorbar(im, fraction=0.046, pad=0.15)\n",
" cbar.set_label('Probability')\n",
Expand Down Expand Up @@ -574,7 +574,7 @@
"source": [
"fig = pl.figure(figsize=(10, 8))\n",
"cgax, im = wrl.vis.plot_rhi(hmc_vals[11], ax=111, \n",
" cg=True, \n",
" proj='cg', \n",
" r=r/1000., th=el,\n",
" cmap='cubehelix', fig=fig)\n",
"cbar = pl.colorbar(im, fraction=0.046, pad=0.1)\n",
Expand Down Expand Up @@ -616,9 +616,9 @@
"source": [
"fig = pl.figure(figsize=(10,8))\n",
"cgax, im = wrl.vis.plot_rhi(hmc_idx[11], ax=111, \n",
" cg={'angular_spacing': 20.,\n",
" 'radial_spacing': 12.,\n",
" 'latmin': 2.5}, \n",
" proj={'angular_spacing': 20.,\n",
" 'radial_spacing': 12.,\n",
" 'latmin': 2.5}, \n",
" r=r/1000., th=el,\n",
" norm=norm, \n",
" cmap=cmap, \n",
Expand Down
6 changes: 3 additions & 3 deletions notebooks/classify/wradlib_fuzzy_echo_classify.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"# Horizontal reflectivity\n",
"ax = plt.subplot(121, aspect=\"equal\")\n",
"ax, pm = wradlib.vis.plot_ppi(np.ma.masked_invalid(dat[\"ref\"]), ax=ax)\n",
"ax = wradlib.vis.plot_ppi_crosshair(site=(0,0), \n",
"ax = wradlib.vis.plot_ppi_crosshair(site=(0,0,0), \n",
" ranges=[80,160,240])\n",
"plt.xlim(-240,240)\n",
"plt.ylim(-240,240)\n",
Expand All @@ -191,7 +191,7 @@
"ax, pm = wradlib.vis.plot_ppi(np.ma.masked_array(cmap.astype(np.uint8), \n",
" np.isnan(dat[\"ref\"])),\n",
" ax=ax, cmap=\"bwr\")\n",
"ax = wradlib.vis.plot_ppi_crosshair(site=(0,0),\n",
"ax = wradlib.vis.plot_ppi_crosshair(site=(0,0,0),\n",
" ranges=[80,160,240])\n",
"plt.xlim(-240,240)\n",
"plt.ylim(-240,240)\n",
Expand Down Expand Up @@ -220,7 +220,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.3"
},
"livereveal": {
"scroll": true
Expand Down
4 changes: 2 additions & 2 deletions notebooks/fileio/wradlib_load_rainbow_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"outputs": [],
"source": [
"fig = pl.figure(figsize=(8,8))\n",
"cgax, pm = wrl.vis.plot_ppi(data, r=r, az=azi, fig=fig, cg=True)\n",
"cgax, pm = wrl.vis.plot_ppi(data, r=r, az=azi, fig=fig, proj='cg')\n",
"\n",
"title = '{0} {1} {2} {3}\\n{4}E {5}N'.format(sensortype, sensorname, date,\n",
" time, lon, lat)\n",
Expand Down Expand Up @@ -184,7 +184,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.3"
},
"toc": {
"colors": {
Expand Down
10 changes: 5 additions & 5 deletions notebooks/fileio/wradlib_radar_formats.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"outputs": [],
"source": [
"fig = pl.figure(figsize=(10,8))\n",
"im = wrl.vis.plot_ppi(data, fig=fig, cg=True)"
"im = wrl.vis.plot_ppi(data, fig=fig, proj='cg')"
]
},
{
Expand Down Expand Up @@ -373,7 +373,7 @@
"outputs": [],
"source": [
"fig = pl.figure(figsize=(10,8))\n",
"im = wrl.vis.plot_ppi(fcontent['dataset1/data1/data'], fig=fig, cg=True)"
"im = wrl.vis.plot_ppi(fcontent['dataset1/data1/data'], fig=fig, proj='cg')"
]
},
{
Expand Down Expand Up @@ -465,7 +465,7 @@
"outputs": [],
"source": [
"fig = pl.figure(figsize=(10,8))\n",
"im = wrl.vis.plot_ppi(data['SCAN0']['ZH']['data'], fig=fig, cg=True)"
"im = wrl.vis.plot_ppi(data['SCAN0']['ZH']['data'], fig=fig, proj='cg')"
]
},
{
Expand Down Expand Up @@ -546,7 +546,7 @@
"outputs": [],
"source": [
"fig = pl.figure(figsize=(10,8))\n",
"im = wrl.vis.plot_ppi(fcontent['scan0/moment_3']['data'], fig=fig, cg=True)"
"im = wrl.vis.plot_ppi(fcontent['scan0/moment_3']['data'], fig=fig, proj='cg')"
]
},
{
Expand Down Expand Up @@ -849,7 +849,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.3"
},
"livereveal": {
"scroll": true
Expand Down
8 changes: 4 additions & 4 deletions notebooks/fileio/wradlib_reading_dx.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
"# Plot PPI,\n",
"ax, pm = wrl.vis.plot_ppi(two_scans[0], cmap=\"viridis\")\n",
"# add crosshair,\n",
"ax = wrl.vis.plot_ppi_crosshair((0,0), ranges=[40,80,128])\n",
"ax = wrl.vis.plot_ppi_crosshair((0,0,0), ranges=[40,80,128])\n",
"# add colorbar,\n",
"cbar = pl.colorbar(pm, shrink=0.9)\n",
"cbar.set_label(\"Reflectivity (dBZ)\")\n",
Expand Down Expand Up @@ -221,7 +221,7 @@
"# Plot PPI,\n",
"ax, pm = wrl.vis.plot_ppi(one_scan, cmap=\"viridis\", ax=ax, vmin=20, vmax=60)\n",
"# add crosshair,\n",
"ax = wrl.vis.plot_ppi_crosshair((0,0), ranges=[40,80,128])\n",
"ax = wrl.vis.plot_ppi_crosshair((0,0,0), ranges=[40,80,128])\n",
"# add colorbar,\n",
"cbar = pl.colorbar(pm, shrink=0.5)\n",
"cbar.set_label(\"Reflectivity (dBZ)\")\n",
Expand All @@ -235,7 +235,7 @@
"# Plot PPI,\n",
"ax, pm = wrl.vis.plot_ppi(two_scans[0], cmap=\"viridis\", ax=ax, vmin=20, vmax=60)\n",
"# add crosshair,\n",
"ax = wrl.vis.plot_ppi_crosshair((0,0), ranges=[40,80,128])\n",
"ax = wrl.vis.plot_ppi_crosshair((0,0,0), ranges=[40,80,128])\n",
"# add colorbar,\n",
"cbar = pl.colorbar(pm, shrink=0.5)\n",
"cbar.set_label(\"Reflectivity (dBZ)\")\n",
Expand Down Expand Up @@ -271,7 +271,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.3"
},
"toc": {
"colors": {
Expand Down
5 changes: 3 additions & 2 deletions notebooks/georeferencing/wradlib_coords_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@
"source": [
"coords, proj_radar = georef.spherical_to_xyz(coord[..., 0],\n",
" np.degrees(coord[..., 1]),\n",
" coord[..., 2], sitecoords)\n",
" coord[..., 2], sitecoords,\n",
" squeeze=True)\n",
"test = coords[0, 90, 0:960:60, 0]\n",
"print(test)"
]
Expand Down Expand Up @@ -188,7 +189,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.3"
},
"toc": {
"colors": {
Expand Down
6 changes: 4 additions & 2 deletions notebooks/georeferencing/wradlib_georef_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"proj_wgs84 = georef.epsg_to_osr(4326)\n",
"polygons = georef.spherical_to_polyvert(r, az, 0, sitecoords, \n",
" proj=proj_wgs84)\n",
"polygons = polygons[..., 0:2]"
"polygons = polygons[..., 0:2]\n",
"polygons.shape"
]
},
{
Expand All @@ -99,6 +100,7 @@
"source": [
"cent_coords = georef.spherical_to_centroids(r, az, 0, sitecoords,\n",
" proj=proj_wgs84)\n",
"cent_coords = np.squeeze(cent_coords)\n",
"cent_lon = cent_coords[..., 0]\n",
"cent_lat = cent_coords[..., 1]"
]
Expand Down Expand Up @@ -172,7 +174,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.3"
},
"toc": {
"colors": {
Expand Down
5 changes: 3 additions & 2 deletions notebooks/match3d/wradlib_match_workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@
"\n",
"# create gr polar grid and calculate aeqd-xyz coordinates\n",
"gr_polargrid = np.meshgrid(r_gr, az_gr)\n",
"gr_xyz, rad = wrl.georef.spherical_to_xyz(gr_polargrid[0], gr_polargrid[1], elev_gr, (lon0_gr, lat0_gr, alt0_gr ))\n",
"gr_xyz, rad = wrl.georef.spherical_to_xyz(gr_polargrid[0], gr_polargrid[1], elev_gr, (lon0_gr, lat0_gr, alt0_gr ), \n",
" squeeze=True)\n",
"print(\"XYZ-Grid-Shape:\", gr_xyz.shape)\n",
"\n",
"# create gr poygon array in aeqd-xyz-coordinates\n",
Expand Down Expand Up @@ -1367,7 +1368,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.3"
},
"toc": {
"colors": {
Expand Down
14 changes: 7 additions & 7 deletions notebooks/visualisation/wradlib_plot_curvelinear_grids.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
"outputs": [],
"source": [
"fig = pl.figure(figsize=(10,8))\n",
"ax, pm = wrl.vis.plot_ppi(ma, fig=fig, cg=True)\n",
"ax, pm = wrl.vis.plot_ppi(ma, fig=fig, proj='cg')\n",
"t = pl.title('Simple CG PPI')\n",
"t.set_y(1.05)"
]
Expand Down Expand Up @@ -228,7 +228,7 @@
"outputs": [],
"source": [
"fig = pl.figure(figsize=(10,8))\n",
"cgax, pm = wrl.vis.plot_ppi(ma, r=r, az=az, fig=fig, cg=True)\n",
"cgax, pm = wrl.vis.plot_ppi(ma, r=r, az=az, fig=fig, proj='cg')\n",
"\n",
"caax = cgax.parasites[0]\n",
"t = pl.title('Decorated CG PPI')\n",
Expand Down Expand Up @@ -257,7 +257,7 @@
"cg={'radial_spacing': 14.,\n",
" 'latmin': 10e3}\n",
"fig = pl.figure(figsize=(10,8))\n",
"cgax, pm = wrl.vis.plot_ppi(ma, r=r, az=az, fig=fig, proj=cg)\n",
"cgax, pm = wrl.vis.plot_ppi(ma, r=r, az=az, fig=fig, proj='cg')\n",
"caax = cgax.parasites[0]\n",
"t = pl.title('Decorated CG PPI')\n",
"t.set_y(1.05)\n",
Expand Down Expand Up @@ -560,7 +560,7 @@
"outputs": [],
"source": [
"fig = pl.figure(figsize=(10,8))\n",
"cgax, pm = wrl.vis.plot_rhi(ma1, r=r, th=th, rf=1e3, fig=fig, ax=111, cg=True)\n",
"cgax, pm = wrl.vis.plot_rhi(ma1, r=r, th=th, rf=1e3, fig=fig, ax=111, proj='cg')\n",
"\n",
"caax = cgax.parasites[0]\n",
"t = pl.title('Decorated CG RHI')\n",
Expand Down Expand Up @@ -643,7 +643,7 @@
"fig = pl.figure(figsize=(10,8))\n",
"fig.subplots_adjust(wspace=0.2, hspace=0.35)\n",
"for sp in subplots:\n",
" cgax, pm = wrl.vis.plot_rhi(ma1, r, th, rf=1e3, ax=sp, cg=True)\n",
" cgax, pm = wrl.vis.plot_rhi(ma1, r, th, rf=1e3, ax=sp, proj='cg')\n",
" caax.parasites=[0]\n",
" t = pl.title('CG RHI #%(sp)d' %locals())\n",
" t.set_y(1.1)\n",
Expand Down Expand Up @@ -687,7 +687,7 @@
"labelpad = [1.25, 1.25, 1.1, 1.25, 1.25]\n",
"fig = pl.figure(figsize=(10,8))\n",
"for i, sp in enumerate(subplots):\n",
" cgax, pm = wrl.vis.plot_rhi(ma1, r, th, rf=1e3, ax=sp, cg=True)\n",
" cgax, pm = wrl.vis.plot_rhi(ma1, r, th, rf=1e3, ax=sp, proj='cg')\n",
" caax = cgax.parasites[0]\n",
" t = pl.title('CG RHI #%(i)d' %locals())\n",
" t.set_y(labelpad[i])\n",
Expand Down Expand Up @@ -857,7 +857,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.3"
},
"toc": {
"colors": {
Expand Down