You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using SDSS.query_region(), passing a list of names with the obj_names parameter does not perform as described in the documentation. The documentation says the names passed in will be repeated in the query result, but the names are not included in the resulting tables. A minimum working example is shown below:
This query results in the following table, which does not contain a column that indicates the matching input source name:
ra
dec
objid
run
rerun
camcol
field
z
plate
mjd
fiberID
specobjid
run2d
0
154.052
1.93962
1.23765e+18
1907
301
3
210
0.0706007
502
51957
636
5.65377e+17
26
1
154.13
1.97446
1.23765e+18
1907
301
3
210
1.62504
502
51957
635
5.65376e+17
26
2
154.001
2.19423
1.23765e+18
1462
301
4
191
0.101115
502
51957
632
5.65376e+17
26
Having the capability to return the object names associated with each query is a very useful feature as it helps cut down on additional cross-matching that would be needed to associate each returned object with objects in the input coordinate list. I tried digging into the source code to identify a fix, but it was unclear to me how the obj_names parameter is being passed to the requests.request() function.
I am using python 3.11.9, astroquery v0.4.7 , astropy v6.1.0, and requests v2.32.2
The text was updated successfully, but these errors were encountered:
This does seem like a useful feature that is missing. It seems like this may have been a feature supported upstream previously?
The documentation string was added in bd466c3#diff-21730ab789d1dfbe23a79790bf6afa2d13630a7232c3bcd4cfe24e486a57e5beR178
This PR doesn't say how this repeat was achieved, but the queries at the time were structured differently. Now, the data including the names & coordinates is sent as the 'upload' keyword, but previously it was sent as the 'paste' keyword. Presumably the upstream service handles these cases differently.
When using
SDSS.query_region()
, passing a list of names with theobj_names
parameter does not perform as described in the documentation. The documentation says the names passed in will be repeated in the query result, but the names are not included in the resulting tables. A minimum working example is shown below:This query results in the following table, which does not contain a column that indicates the matching input source name:
Having the capability to return the object names associated with each query is a very useful feature as it helps cut down on additional cross-matching that would be needed to associate each returned object with objects in the input coordinate list. I tried digging into the source code to identify a fix, but it was unclear to me how the
obj_names
parameter is being passed to therequests.request()
function.I am using python 3.11.9, astroquery v0.4.7 , astropy v6.1.0, and requests v2.32.2
The text was updated successfully, but these errors were encountered: