Closed ksterne closed 8 years ago
Pinging to see if someone can give this a look over. Should be able to run using the code I've listed here... clean and simple.
Hi kevin,
What kind of error are we expecting to see in rbsp.py in the current master branch? I have run the following commands in master branch, and it seems to be working.
from datetime import datetime from davitpy.gme.sat import rbsp import matplotlib.pyplot as plt sTime = datetime(2012, 9, 1, 0) eTime = datetime(2012, 9, 1, 6) fps = rbsp.rbspFp(sTime, eTime)
print fps Van Allen Probes (a.k.a. RBSP) ionospheric footpoints 2012-Sep-01 at 00:00 UT to 2012-Sep-01 at 06:00 UT 146 points 2 apogee(s): 01:45 UT, A: ( 68.47 N, 94.93 E) (-51.43 N, 106.23 E) 01:55 UT, B: ( 68.44 N, 92.27 E) (-51.56 N, 104.63 E)
fps.map() plt.show()
On Sun, Apr 3, 2016 at 9:49 PM, Kevin Sterne notifications@github.com wrote:
Found the website information for accessing Van Allen probe orbit data outdated in #209 https://github.com/vtsuperdarn/davitpy/issues/209. This pull request fixes this bug by updating the URL as well as adjusting to the new returned data format from the JHU/APL server.
You can confirm that the old URL does not work by using:
` # Get all the FPs for 1/Sept/2012 from 0 to 6 UT from datetime import datetime import rbsp
print "" print "Testing footprint collection and apogee calculation..." print "" print "Expected results for orbits on September 1, 2012 between" print "00:00 and 06:00 utc:" print " 01:45 UT, A: ( 68.47 N, 94.93 E) (-51.43 N, 106.23 E)" print " 01:55 UT, B: ( 68.44 N, 92.27 E) (-51.56 N, 104.03 E)" print "" print "Calculated results:" print "" sTime = datetime(2012, 9, 1, 0) eTime = datetime(2012, 9, 1, 6) fps = rbsp.rbspFp(sTime, eTime) # Pretty print the apogees in that period print fps`
Also added in a unit test for the module to hopefully start conforming to a file being able to test itself. The code above is largely the unit test for the file, so when using this branch, you can just run python rbsp.py
in that directory.
You can view, comment on, or merge this pull request online at:
https://github.com/vtsuperdarn/davitpy/pull/232 Commit Summary
- Merge pull request #229 from vtsuperdarn/master
- Spacecraft input check, start to redoURL
- Adding new URL, start of file processing
- Finishing change to post-web-fetch processing
- Removing old variable
- Removing debugging bits
- Start of PEP8 style edits
- Finishing PEP8 style edits
- Start of unit test
- Removed force debugging line
- Fixed line continuation errors
- Cleanup of debug line in getOrbit
- Using suggested example
- Undoing debugging statements
- Problem format string fixed
- Cleaning up and adding notes for unit test
- PEP8 re-edits
File Changes
- M davitpy/gme/sat/rbsp.py https://github.com/vtsuperdarn/davitpy/pull/232/files#diff-0 (322)
Patch Links:
- https://github.com/vtsuperdarn/davitpy/pull/232.patch
- https://github.com/vtsuperdarn/davitpy/pull/232.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/vtsuperdarn/davitpy/pull/232
Hi @ksterne,
I have the same question as @MuhammadVT. Running your code example in the develop
branch, I get the expected output without any errors. How does this show that the code in the develop
branch is broken?
In fact, running the develop
branch code and running the code in this bugfix branch yields identical results.
I just noticed that you didn't make this pull request into the develop
branch, but the master
branch. Once we've figured out what's going on and we are ready to merge this, you'll have to make a new pull request for develop
instead, unless we decide this is a major bug that we need to hotfix master
with.
Doh! I think I submitted this pull request too late in the day. Thanks for the catch of pulling this into the master
branch. That was my mistake. I think I know what is going on here. Since I gave an example that is in the past, the code connects to the VT rbsp database and gets the information without accessing the APL server. I'll add a little bit here and make a new pull request shortly.
No problem! I'm glad you are developing! Hopefully I can get some stuff coded up here soon. I've got a few things in the works.
Found the website information for accessing Van Allen probe orbit data outdated in #209. This pull request fixes this bug by updating the URL as well as adjusting to the new returned data format from the JHU/APL server.
You can confirm that the old URL does not work by using:
` # Get all the FPs for 1/Sept/2012 from 0 to 6 UT from datetime import datetime import rbsp
Also added in a unit test for the module to hopefully start conforming to a file being able to test itself. The code above is largely the unit test for the file, so when using this branch, you can just run
python rbsp.py
in that directory.