Closed aburrell closed 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
- M davitpy/pydarn/plotting/mapOverlay.py https://github.com/vtsuperdarn/davitpy/pull/269/files#diff-0 (10)
- M davitpy/pydarn/radar/radFov.py https://github.com/vtsuperdarn/davitpy/pull/269/files#diff-1 (42)
Patch Links:
- https://github.com/vtsuperdarn/davitpy/pull/269.patch
- https://github.com/vtsuperdarn/davitpy/pull/269.diff
— 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
I'll give this a test in a few hours and report back.
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.
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")
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