Python 以弗所:';泰坦';对象没有属性';mag&x27;
我试图确定土卫六的大小,但结果是错误信息: AttributeError:“Titan”对象没有属性“mag”Python 以弗所:';泰坦';对象没有属性';mag&x27;,python,pyephem,Python,Pyephem,我试图确定土卫六的大小,但结果是错误信息: AttributeError:“Titan”对象没有属性“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
>>> 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'
>>导入ephem
>>>t=以弗所泰坦()
>>>t.compute()
>>>特拉
15:55:10.52
>>>t.mag
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
AttributeError:“Titan”对象没有属性“mag”
泰坦不具有震级属性吗?为什么?我可以确定天王星或月球的大小,但不能确定土卫六的大小。至少不能使用“mag”属性。
怎么办
编辑:
根据
ephem.Body
类型是唯一具有.mag
属性的类型
泰坦被归类为ephem.PlanetMoon
对象,因此没有.mag
属性
当前的ephem.Body
对象列表为:
木星、火星、水星、月亮、海王星、冥王星、土星、太阳、天王星、金星
我不知道在以弗所有任何方法可以计算一个
ephem.PlanetMoon
物体的.mag
,据我所知,土卫六应该有一个星等。参考:谢谢。我会根据土星的大小来计算土卫六的大小。我希望直接得到它,但显然是不可能的。。。无论如何谢谢你!