eteq/astropysics — Issue #3: astropysics.obstools.site methods apparentCoordinates and equatorialToHorizontal fail
Author: mwcraig
Created: 2011-10-31 03:18:33+00:00
State: open

I'm new to python, so apologies if the issue is me rather than the code.

I get errors when I try either of the methods apparentCoordinates or equitorialToHorizontal, the former apparently because the equation of the equinoxes isn't implemented and the latter, I think, because it tries to `from .coords import EquatorialCoordinates,HorizontalCoordinates` and the correct name is either EquatorialCoordinatesBase or one of the classes derived from it.

Tracebacks are below.

I'm happy to try fixing either problem, but would need some guidance as to how to make python pay attention to my version of astropysics instead of the version I installed with pip.

**apparentCoordinates problem**
```python
In [70]: feder.apparentCoordinates(radec)---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
/Users/mcraig/Development/python/py4ast/core/ in ()
----> 1 feder.apparentCoordinates(radec)

/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/astropysics/obstools.pyc in apparentCoordinates(self, coords, datetime, precess, refraction)
1164
1165 if datetime is None:
-> 1166 return self.equatorialToHorizontal(coords,self.localSiderialTime())
1167 elif hasattr(datetime,'year') or (isSequenceType(datetime) and hasattr(datetime[0],'year')):
1168 jd = calendar_to_jd(datetime,self.tz).ravel()

/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/astropysics/obstools.pyc in localSiderialTime(self, *args, **kwargs)
871 raise TypeError('invalid number of input arguments')
872
--> 873 lst = (greenwich_sidereal_time(jd,apparent) + self._long.d/15)%24.0
874
875 # #from idl astro ct2lst.pro

/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/astropysics/coords/funcs.pyc in greenwich_sidereal_time(jd, apparent)
156 eps,dpsi,deps = _nutation_components2000B(jd,False)
157 dpsi = dpsi
--> 158 raise NotImplementedError('need to implement complementary terms for equation of the equinoxes from iauEect00 0 use "simple" for now')
159 coor = 0
160 return ((gmst + dpsi*np.cos(eps))*12/pi + coor)%24

NotImplementedError: need to implement complementary terms for equation of the equinoxes from iauEect00 0 use "simple" for now
```

** equatorialToHorizontal problem **
```python
In [71]: feder.equatorialToHorizontal(radec,feder.localSiderialTime(apparent=False))
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/Users/mcraig/Development/python/py4ast/core/ in ()
----> 1 feder.equatorialToHorizontal(radec,feder.localSiderialTime(apparent=False))

/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/astropysics/obstools.pyc in equatorialToHorizontal(self, eqpos, lsts, epoch)
1018 coordinate conversion.
1019 """
-> 1020 from .coords import EquatorialCoordinates,HorizontalCoordinates
1021
1022 latitude = self.latitude.d

ImportError: cannot import name EquatorialCoordinates
```