Skip to content

Query with table returns incorrect index? #1116

Open
@bamcleod

Description

@bamcleod

I am attempting to find stars that are 6 arcmin away from a set of brighter stars and tried to emulate the "Query with table" example. The '_q' column should give me an index in to my original table, but instead of getting 1,2,3....n, I am getting 1,4,7,...3n-2. Am I missing something?

Example code:

import astroquery
import astropy.units as u
from astropy.coordinates import SkyCoord
from astroquery.vizier import Vizier
from astropy.coordinates import Angle
Vizier.ROW_LIMIT = -1
import numpy as np

aocat='I/305/out'
hour=0.5
dec=-20
coord = SkyCoord(ra=hour, dec=dec, unit=(u.hour, u.deg))
 
bright = Vizier(catalog=aocat, columns = ['_RAJ2000', '_DEJ2000', 'Vmag'], column_filters={'Vmag':'4.0..9.0'})
bright.ROW_LIMIT=-1
aostars = bright.query_region(coord, height='10d', width='10d', catalog=aocat)[0]
phasingstars = Vizier.query_region(aostars, catalog='2MASS', radius='6.5m', inner_radius='5.5m')[0]

print (len(aostars))
# 149

print (np.unique(phasingstars['_q']))
# None
#----
#   1
#   4
#   7
# ...
# 445
# Length = 149 rows

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions