This repository has been archived by the owner on May 13, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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