skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.43k stars 213 forks source link

Memory error #222

Closed tmamedzadeh closed 5 years ago

tmamedzadeh commented 5 years ago

This is your code from https://stackoverflow.com/a/51698405/8422121

from numpy import arange
from skyfield.api import load, EarthSatellite

iss_tle0 = """\
1 25544U 98067A   18184.80969102  .00001614  00000-0  31745-4 0  9993
2 25544  51.6414 295.8524 0003435 262.6267 204.2868 15.54005638121106
"""
my_earthsat = EarthSatellite(*iss_tle0.splitlines())

tz_offset = -4

ts = load.timescale()
t = ts.utc(2018, 6, 21, tz_offset, 0, arange(24 * 60 * 60))
astrometrics = my_earthsat.at(t)

It gives

  File "<tmp 1>", line 14, in <module>
    astrometrics = my_earthsat.at(t)
  File "..\python\python36-32\lib\site-packages\skyfield\errors.py", line 37, in wrapper
    return method(self, jd)
  File "..\python\python36-32\lib\site-packages\skyfield\vectorlib.py", line 74, in at
    p, v, observer_data.gcrs_position, message = self._at(t)
  File "..\python\python36-32\lib\site-packages\skyfield\sgp4lib.py", line 140, in _at
    an x,y,z vector measured in au/day, and the error is a vector of
  File "..\python\python36-32\lib\site-packages\skyfield\positionlib.py", line 407, in ITRF_to_GCRS
    gcrs_position = observer_data.gcrs_position
  File "..\python\python36-32\lib\site-packages\skyfield\timelib.py", line 520, in __getattr__
    def utc_strftime(self, format):
  File "..\python\python36-32\lib\site-packages\skyfield\nutationlib.py", line 46, in earth_tilt
    def earth_tilt(t):
  File "..\python\python36-32\lib\site-packages\skyfield\nutationlib.py", line 233, in iau2000a
MemoryError
brandon-rhodes commented 5 years ago

How much memory does the device have you're running Python on?

tmamedzadeh commented 5 years ago

8 GB RAM. Does it work on your computer?

tmamedzadeh commented 5 years ago

I had 32bit python. Solved by installing 64 bit. Thanks.