-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EHN: Single Beam Options #298
Conversation
Hi, Matplotlib version: 3.6.3 import matplotlib.pyplot as plt file = "20150308.1400.03.cly.fitacf" FOV plot highlighting geographic and magnetic_, _ , ax, ccrs = pydarn.Fan.plot_fov(fitacf_data[0]['stid'], dt.datetime(2015,3,8,14,10), beam=10, grid=True, fov_color='red',coords=pydarn.Coords.GEOGRAPHIC ,projs=pydarn.Projs.GEO, coastline=True, lowlat=50) _, _, ax, _ = pydarn.Fan.plot_fov(fitacf_data[0]['stid'], dt.datetime(2015,3,8,14,10), beam=10, grid=True, fov_color='red', coastline=True, lowlat=50) Fan plot with specific data in geo and mag_, _, ax, ccrs = pydarn.Fan.plot_fov(fitacf_data[0]['stid'], dt.datetime(2015,3,8,14,10), coastline=True, lowlat=50, coords=pydarn.Coords.GEOGRAPHIC ,projs=pydarn.Projs.GEO) _, _, ax, _ = pydarn.Fan.plot_fov(fitacf_data[0]['stid'], dt.datetime(2015,3,8,14,10), coastline=True, lowlat=50) Message: |
Hi @KhanalKrishna I can't recreate the error, does the code still work if you try to plot without the beam options? Also what are your numpy and cartopy versions? (I'm on 1.23.1 and 0.21.1 respectively, I am getting a different but similar error when I downgrade cartopy) EDIT: Hmm, actually I think this might be mismatching matplotlob/cartopy+shapely/numpy versions. Recently, cartopy changed the install instructions regarding shapely, and if I play with the recent different versions of all these I get various errors with cartopy. If you update all these packages to their most recent versions (except numpy, 1.23.1 will avoid the pydarnio bug) and I can work backwards and figure out if we need to update the dependencies. Thanks for testing! |
Hi @carleyjmartin, |
matplotlib version: 3.5.3 Hi @carleyjmartin, for some data files, the beams in last two plots extend beyond the radar FOV. I changed only filename and date_time. import matplotlib.pyplot as plt #file= "20150308.1400.03.cly.fitacf" #date_time= dt.datetime(2015,3,8,14,10) FOV plot highlighting geographic and magnetic_, _ , ax, ccrs = pydarn.Fan.plot_fov(fitacf_data[0]['stid'], date_time, beam=10, grid=True, fov_color='red',coords=pydarn.Coords.GEOGRAPHIC ,projs=pydarn.Projs.GEO, coastline=True, lowlat=50) _, _, ax, _ = pydarn.Fan.plot_fov(fitacf_data[0]['stid'], date_time, beam=10, grid=True, fov_color='red', coastline=True, lowlat=50) Fan plot with specific data in geo and mag_, _, ax, ccrs = pydarn.Fan.plot_fov(fitacf_data[0]['stid'], date_time, coastline=True, lowlat=50, coords=pydarn.Coords.GEOGRAPHIC ,projs=pydarn.Projs.GEO) _, _, ax, _ = pydarn.Fan.plot_fov(fitacf_data[0]['stid'], date_time, coastline=True, lowlat=50) |
Thanks for testing @KhanalKrishna ! I'll look into it, although I think it might be an issue with the FOV using 'defaults' we put in and then the fan plot using the real data from a file! Might be adjustable using |
Scope
This PR contains an addition to the
fan.py
module that allows for the optionbeam
to be passed to the fov and fan plotting functions. This allows the user to plot more specific data, or make diagrams with beams in fov. The examples below use a file that is using camping beam, which is a good use case/option to plot single beams. Default forbeam
isNone
. Docs updated.issue: #294
Approval
Number of approvals: 2 test and code review
Test
matplotlib version: 3.6.3
Note testers: please indicate what version of matplotlib you are using
The above code, produces the following plots: