Comments (3)
No worries. Here is a link for ADQL : https://cds.unistra.fr/help/documentation/simbad-more/adql-simbad/ (even if the graph on top is a tiny bit outdated)
And if you're still stuck with adql queries for SIMBAD, the team behind [email protected] will be happy to help.
from astroquery.
Yes, this should raise an error since you used lower case letters for the flux filters (should be fixed by #2954). The b
and v
ones don't exist, so you get an empty result the r
one is distinct from the R
one so you get an error that corresponds to an other filter.
This can be confusing, and I would advise to use a custom TAP query for a better control on the output you get. For your use case, it would look like this:
from astroquery.simbad import Simbad
query = """
SELECT main_id, filter, flux, flux_err, flux.bibcode as flux_bibcode, otype, sp_type
FROM basic
JOIN flux ON oidref = oid
WHERE main_id = 'UCAC4 440-052370'
"""
result = Simbad.query_tap(query)
print(result)
<Table length=10>
main_id filter flux flux_err flux_bibcode otype sp_type
object object float32 float32 object object object
---------------- ------ --------- -------- ------------------- ------ -------
UCAC4 440-052370 i 14.201 0.06 2012yCat.1322....0Z *
UCAC4 440-052370 r 14.429 0.02 2012yCat.1322....0Z *
UCAC4 440-052370 g 15.131 0.04 2012yCat.1322....0Z *
UCAC4 440-052370 V 14.717 0.01 2012yCat.1322....0Z *
UCAC4 440-052370 B 15.632 0.01 2012yCat.1322....0Z *
UCAC4 440-052370 R 14.604 0.13 2012yCat.1322....0Z *
UCAC4 440-052370 G 14.479252 0.00277 2022yCat.1355....0G *
UCAC4 440-052370 K 12.5 0.026 2003yCat.2246....0C *
UCAC4 440-052370 H 12.574 0.026 2003yCat.2246....0C *
UCAC4 440-052370 J 13.068 0.023 2003yCat.2246....0C *
Where select
allows to chose the columns you want (a list of available columns can be read with Simbad.list_columns()
). Since the chosen columns are in the basic
and flux
tables (see the output of the column list) we have to join them together (you can see how to to the join with Simbad.list_linked_tables("flux")
for example).
We selected the object in the last line with WHERE
. This prints all the fluxes known in SIMBAD for this star but you could restrict to some filters with AND filter IN ('B', 'V', 'R')
at the end of the string.
Note that I also added the reference to the paper in which the flux is measured with an alias "flux_bibcode" here.
Hope it helps
PS: If you want to know more about SIMBAD filters, you can do
>>> Simbad.query_tap("select * from filter")
<Table length=17>
description filtername unit
object object object
----------------- ---------- ------
Magnitude U U mag
Magnitude B B mag
Magnitude V V mag
Magnitude R R mag
Magnitude I I mag
Magnitude J J mag
Magnitude H H mag
Magnitude K K mag
Magnitude SDSS u u mag
Magnitude SDSS g g mag
Magnitude SDSS r r mag
Magnitude SDSS i i mag
Magnitude SDSS z z mag
Magnitude Gaia G G mag
JWST NIRCam F150W F150W mag
JWST NIRCam F200W F200W mag
JWST NIRCan F444W F444W mag
from astroquery.
(first time using github issue tracker, sorry for the opening-closing):
Thank you, it helped a lot!
It is slightly more complicated to query this way (didn't really now ADQL) but it gives the right results.
from astroquery.
Related Issues (20)
- Splatalogue.query_lines() seems to be broken? HOT 2
- Slow Simbad.query_objects & IRSA.query_region searches HOT 6
- Use plot directive to generate figures
- modulate verbosity of astroquery.mast.Observations.download_products() HOT 1
- Add support for upload tables for queries in ALMA
- BUG: CI -- no space left on device HOT 2
- ESA Herschel download_data connection error HOT 2
- MAINT: retire/rename exceptions.TimeoutError in favour of requests
- TST: esasky tests take too long time and donwload too much data HOT 8
- BUG: alma test downloads 850+Mb of data HOT 8
- How to download Level 1 ancillary (*cbcd.fits and *cbunc.fits) from IRSA?
- Vizier.query_region() returns incorrect index for some catalog HOT 3
- CI: rerun failing tests at the end
- Bug in rows limitation in module vizier HOT 2
- Unexpected behavior when passing `obj_names` to `SDSS.query_region()`
- Handling No astronomical object found response HOT 5
- IRSA: adding SSA method HOT 1
- Astroquery.gaia API Error: RA cannot be converted to hour or hourangle. HOT 2
- MAST cloud dataset doesn't show level 3 data products
- SimbadClass got an unexpected keyword argument HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astroquery.