navo-workshop icon indicating copy to clipboard operation
navo-workshop copied to clipboard

BUG: use `radius` rather than `diameter` in query examples

Open mstalbot opened this issue 10 months ago • 2 comments

The 'diameter=Angle(cone_search_radius * 2 * u.arcsec)' will lead to a crash in code below, which appears related that the passed **kwargs may not be used in service I am reaching out too.

import pyvo as vo
from astropy.coordinates import SkyCoord
import numpy as np
from astropy.coordinates import Angle
from astropy import units as u

cone_search_services = vo.regsearch(servicetype='conesearch')
service = cone_search_services[458] 
cone_search_radius = 3
coordinates = SkyCoord(233.319218, 48.119651, unit="deg")
table = service.search(pos=coordinates, diameter=Angle(cone_search_radius * 2 * u.arcsec)).to_table()

edit by bsipocz: some reformatting

Second scenario, using diameter=2*cone_search_radius/3600 has no spacial cut effect, a full search is run and results outside of the cone are returned

mstalbot avatar Mar 27 '24 23:03 mstalbot