jpeterbaker / maxfield

Code for maximizing the Ingress fields on a given set fo portals
GNU General Public License v3.0
165 stars 56 forks source link

IndexError running sample #31

Closed RErunix closed 9 years ago

RErunix commented 9 years ago

I have python 2.7.9 running on a Mac. I ran pip install as documented, and then ran the sample as documented.

$ python makePlan.py -n 4 EXAMPLE.csv out/ output.pkl /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/_methods.py:55: RuntimeWarning: Mean of empty slice. warnings.warn("Mean of empty slice.", RuntimeWarning) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/_methods.py:65: RuntimeWarning: invalid value encountered in true_divide ret, rcount, out=ret, casting='unsafe', subok=False) Traceback (most recent call last): File "makePlan.py", line 261, in sys.exit(main()) File "makePlan.py", line 161, in main xy = geometry.gnomonicProj(locs,xyz) File "/Users/runix/prog/ingress/maxfield/lib/geometry.py", line 173, in gnomonicProj a = np.pi/2-pts[:,0] IndexError: too many indices

Does this code need a particular version of Python or some other change to the environment?

timw077 commented 9 years ago

It looks like you have the wrong values for the GPA coordinates. Just use the long lat, not the E5 format. On Jun 24, 2015 5:21 PM, "RErunix" notifications@github.com wrote:

I have python 2.7.9 running on a Mac. I ran pip install as documented, and then ran the sample as documented.

$ python makePlan.py -n 4 EXAMPLE.csv out/ output.pkl /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/_methods.py:55: RuntimeWarning: Mean of empty slice. warnings.warn("Mean of empty slice.", RuntimeWarning) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/_methods.py:65: RuntimeWarning: invalid value encountered in true_divide ret, rcount, out=ret, casting='unsafe', subok=False) Traceback (most recent call last): File "makePlan.py", line 261, in sys.exit(main()) File "makePlan.py", line 161, in main xy = geometry.gnomonicProj(locs,xyz) File "/Users/runix/prog/ingress/maxfield/lib/geometry.py", line 173, in gnomonicProj a = np.pi/2-pts[:,0] IndexError: too many indices

Does this code need a particular version of Python or some other change to the environment?

— Reply to this email directly or view it on GitHub https://github.com/jpeterbaker/maxfield/issues/31.

RErunix commented 9 years ago

I created a sample using Intel map coordinates and that worked fine. Thanks for the quick response!

timw077 commented 9 years ago

I ran into the same problem. I used this a while back when it used the E5 format. A bunch more portals came on line in the area. I added them to my list and it blew up.

I should fix the example.CSV and readme, then do a pull request. ;)

Glad to help. On Jun 24, 2015 5:31 PM, "RErunix" notifications@github.com wrote:

I created a sample using Intel map coordinates and that worked fine. Thanks for the quick response!

— Reply to this email directly or view it on GitHub https://github.com/jpeterbaker/maxfield/issues/31#issuecomment-115054396 .