vtsuperdarn / davitpy

DEPRECATED The DaViT Python project
http://vtsuperdarn.github.com/davitpy/
GNU General Public License v3.0
37 stars 59 forks source link

overlayFov groundscatter model bugfix #269

Closed aburrell closed 8 years ago

aburrell commented 8 years ago

Fixed bug that caused fields-of-view to not close when the groundscatter model is used.

To test:

import datetime as dt import davitpy import matplotlib.pyplot as plt plt.ion() f = plt.figure() ax = f.add_subplot(1,1,1) import mpl_toolkits.basemap as basemap rad = 'han' stime = dt.datetime(2006, 10, 1) hard = davitpy.pydarn.radar.site(code=rad, dt=stime) m = davitpy.utils.mapObj(ax=ax, projection="stere", lon_0=hard.geolon, lat_0=hard.geolat, llcrnrlon=0, llcrnrlat=25, urcrnrlat=70, urcrnrlon=135, resolution="l") m.drawcoastlines(linewidth=0.5, color="0.6") fov_test = davitpy.pydarn.radar.radFov.fov(site=hard, ngates=75, altitude=350, coords="geo", model="GS", fov_dir="front") davitpy.pydarn.plotting.overlayFov(m, rad, fovObj=fov_test)

fov_test = davitpy.pydarn.radar.radFov.fov(site=hard, ngates=75, altitude=350, coords="geo", model="IS", fov_dir="back") davitpy.pydarn.plotting.overlayFov(m, rad, fovObj=fov_test, fovColor="b")

gs_fov

print fov_test

latCenter: (16, 75) lonCenter: (16, 75) latFull: (17, 76) lonFull: (17, 76)
slantRCenter: (16, 75) slantRFull: (17, 76) beams: (16,)
gates: (75,) coords: geo field of view: back
model: IS

Shirling-VT commented 8 years ago

Just tested it and get exactly the same results and plot:

print fov_test

latCenter: (16, 75) lonCenter: (16, 75) latFull: (17, 76) lonFull: (17, 76) slantRCenter: (16, 75) slantRFull: (17, 76) beams: (16,) gates: (75,) coords: geo field of view: back model: IS

On Wed, Aug 17, 2016 at 10:37 AM, Angeline Burrell <notifications@github.com

wrote:

Fixed bug that caused fields-of-view to not close when the groundscatter model is used.

To test:

import datetime as dt import davitpy import matplotlib.pyplot as plt plt.ion() f = plt.figure() ax = f.add_subplot(1,1,1) import mpl_toolkits.basemap as basemap rad = 'han' stime = dt.datetime(2006, 10, 1) hard = davitpy.pydarn.radar.site(code=rad, dt=stime) m = davitpy.utils.mapObj(ax=ax, projection="stere", lon_0=hard.geolon, lat_0=hard.geolat, llcrnrlon=0, llcrnrlat=25, urcrnrlat=70, urcrnrlon=135, resolution="l") m.drawcoastlines(linewidth=0.5, color="0.6") fov_test = davitpy.pydarn.radar.radFov.fov(site=hard, ngates=75, altitude=350, coords="geo", model="GS", fov_dir="front") davitpy.pydarn.plotting.overlayFov(m, rad, fovObj=fov_test)

fov_test = davitpy.pydarn.radar.radFov.fov(site=hard, ngates=75, altitude=350, coords="geo", model="IS", fov_dir="back") davitpy.pydarn.plotting.overlayFov(m, rad, fovObj=fov_test, fovColor="b")

[image: gs_fov]

https://cloud.githubusercontent.com/assets/7045886/17740425/761fde40-6490-11e6-820d-d60f6e322bcb.png

You can view, comment on, or merge this pull request online at:

https://github.com/vtsuperdarn/davitpy/pull/269 Commit Summary

  • bugfix

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vtsuperdarn/davitpy/pull/269, or mute the thread https://github.com/notifications/unsubscribe-auth/AIEZK9QZTqsQGdFmHIYXtLmWQw-VVhSYks5qgxzEgaJpZM4JmhU4 .

Best wishes, Xueling

asreimer commented 8 years ago

I'll give this a test in a few hours and report back.

asreimer commented 8 years ago

Testing this pull request, I see that #258 is fixed.

Further testing reveals that this pull request doesn't break anything. Nice work @aburrell!

Merging.