# How to query a region on the sky when given only ecliptic coordinates?

I am new at using the Python packages astropy/astroquery and what I want to achieve is to use it to find stars that lay on the TESS continuous view zone (CVZ).

I know the CVZ is centered at the south pole of the ecliptic an I would like to use the function astroquery.mast.Observations.query_region() to query a region centered at the coordinates of the pole. Such function uses coordinates in the international celestial reference system (ICRS) so first I have to convert from the ecliptic frame the pair $$(\text{lon}=0^\circ , \text{lat}=-90^\circ)$$.

I tried the conversion using the function transform_to(ICRS),however, it returns the following error:

UnitsError: The input HeliocentricTrueEcliptic coordinates do not have length units. This probably means you created coordinates with lat/lon but no distance. Heliocentric<->ICRS transforms cannot function in this case because there is an origin shift.

Could someone elaborate a bit more about the "distance" and "origin shift" mentioned in the error message and how to correct it?

This is because the ICRS has an origin at the barycenter and this is not the same as the center of the Sun (the heliocenter). The heliocenter is offset from the barycenter (although it's still within the radius of the Sun) and varies with time, primarily due to the perturbations of Jupiter and Saturn.

If you use BarycentricTrueEcliptic it will work fine:

from astropy.coordinates import BarycentricTrueEcliptic
from astropy import units as u

cvz = BarycentricTrueEcliptic(lon=0*u.deg, lat=-90*u.deg)
cvz.transform_to(ICRS)
Out:
<ICRS Coordinate: (ra, dec) in deg
(89.9999853, -66.56071866)>


Which agrees with the Coordinate conversions using the LAMBDA website at NASA's HEASARC