desihub / desisurvey

Code for desi survey planning and implementation
BSD 3-Clause "New" or "Revised" License
2 stars 7 forks source link

RA, Dec mix up when calling desisurvey.ephem.get_object_interpolator #100

Closed changhoonhahn closed 5 years ago

changhoonhahn commented 5 years ago

In the class desisurvey.scheduler.Scheduler line 264, self.moon_RADEC is set to desisurvey.ephem.get_object_interpolator

self.moon_RADEC = desisurvey.ephem.get_object_interpolator(self.night_ephem, 'moon', altaz=False)

The interpolator of desisurvey.ephem.get_object_interpolator outputs (dec, ra) however in desisurvey.scheduler.Scheduler.next_tile when self.moon_RADEC is called (line 362) the RA and Dec order is reversed:

moonRA, moonDEC = self.moon_RADEC(mjd_now)

The moon_RADEC is also a misleading name.

dkirkby commented 5 years ago

Thanks for catching this @changhoonhahn! @schlafly also mentioned this to me a few days ago and we will get the fix in soon (probably via #99).