2015-06-08 45 views
2

我試圖確定泰坦的大小,但結果是這樣的錯誤消息: AttributeError的:「泰坦」對象沒有屬性「MAG」Pyephem:「泰坦」對象沒有屬性「MAG」

>>> import ephem 
>>> t = ephem.Titan() 
>>> t.compute() 
>>> t.ra 
15:55:10.52 
>>> t.mag 
Traceback (most recent call last): 
File "<stdin>", line 1, in <module> 
AttributeError: 'Titan' object has no attribute 'mag' 

不是泰坦有屬性大小嗎?爲什麼?我可以確定天王星或月球的強度,但不是泰坦。至少不要使用'mag'屬性。 會是怎樣的方式?

編輯: 使用ephem的版本3.7.5.3和3.7.5.1。

+0

.mag至於我可以看到,泰坦應該有一個幅度。參考:https://github.com/brandon-rhodes/pyephem/blob/master/libastro-3.7.6/satmoon.c – Nayuki

回答

3

按照PyEphem Homepage Docs

ephem.Body類型是唯一的類型與.mag屬性

泰坦被歸類爲ephem.PlanetMoon對象,因此不具有.mag屬性

的當前列表ephem.Body物體是: 木星,火星,水星,月亮,海王星,冥王星,土星,太陽,天王星,金星。

我不知道在ephem任何方式來計算ephem.PlanetMoon對象

+0

謝謝。我會嘗試根據土星的強度來計算泰坦的強度。我希望直接獲得它,但顯然這是不可能的... 還是謝謝! – Inaki