Open molinaro-m opened 4 years ago
This is also an issue for SSA. At DataCentral we workaround this from the client side with pyvo/pandas by doing multiple searches and then concatenating the results. This however depends on the votable output of SSA, e.g.:
indiv_results = [] targets = ['g2037567-243832','g2038197-250660','g2039258-245126']
for t in targets: custom = {} custom['FILTER'] = 'VR' custom['TARGETNAME'] = t custom['COLLECTION'] = '6dfgs_fdr' results = service.search(**custom) indiv_results.append(results.votable.get_first_table().to_table(use_names_over_ids=True).to_pandas())
df = pd.concat(indiv_results,ignore_index=True)
This is one with a pos search:
indiv_results = []
coords = [(214,0),(217,0)] for c in coords: pos = (c[0]u.deg,c[1]u.deg) custom = {} custom['SIZE'] = 0.3
custom['REDSHIFT'] = '0/'
custom['INSTRUMENT'] = '2dF-AAOmega'
custom['COLLECTION'] = 'gama_dr2'
results = service.search(pos=pos,**custom)
#add all results
indiv_results.append(results.votable.get_first_table().to_table(use_names_over_ids=True).to_pandas())
df = pd.concat(indiv_results,ignore_index=True)
Another option is to have multiple POS parameter values as done in SIA (e.g. POS=CIRCLE a b c&POS=CIRCLE e f g). You'd probably want a column in the results with the input search pos and radius, plus a column for distance from this position.
On Wed, Jan 27, 2021 at 03:16:05AM -0800, Brent Miszalski wrote:
This is also an issue for SSA. At DataCentral we workaround this from the client side with pyvo/pandas by doing multiple searches and then concatenating the results, e.g.:
While I'm not arguing strongly against developing S-protocols towards allowing multiple cones (or other parameters), my take is that we already have a powerful protocol that allows this kind of thing: TAP.
And so I'd much rather spend the effort on educating people that still have data in SSA services that is not available through ObsTAP to fix that (since SSA isn't so far from obscore, it's really not hard).
I'd even volunteer to host their obscore records if necessary...
How to query a catalogue with multiple target positions?