๐๐ฏ๐บ Gaia Photometryยถ
Often you need to know the magnitude of a star. Fortunately, the space-based Gaia survey has observed the entire sky with incredible precision; basically any star you can see with a moderate ground-based telescope has already been observed by Gaia. Common reasons you might need to download stars from Gaia would be to locate where to put apertures in an image or to use a star you observed as a flux calibrator; this page demonstrates two little tools that might be helpful for those purposes!
Downloading Gaia Data ๐พยถ
To get a table of positions and photometry, we can use the get_gaia function. This is a wrapper to astroquery and the fabulous Gaia archive, designed to be quick and easy to use.
from astropy.coordinates import SkyCoord
import astropy.units as u
from astr3510 import get_gaia
To download some stars, specify a center and a radius, and let the function download data within that radius of that location. This will both download the star magnitudes directly measured with Gaia (G_gaia, BP_gaia, RP_gaia) and use color transformations to estimate the magnitudes in other common filters (g_sloan, r_sloan, i_sloan, V_johnsoncousins, R_johnsoncousins, I_johnsoncousins). With the results, you should have a decent estimate of the brightness of any star you want!
random_center = SkyCoord(ra=123.45*u.deg, dec=67.89*u.deg)
random_radius = 10*u.arcmin
random_stars = get_gaia(random_center, radius=random_radius)
INFO: Query finished. [astroquery.utils.tap.core]
random_stars
| source_id | ra | dec | G_gaia_mag | RP_gaia_mag | BP_gaia_mag | parallax | parallax_error | pmra | pmra_error | pmdec | pmdec_error | distance_from_center | r_sloan_mag | i_sloan_mag | g_sloan_mag | V_johnsoncousins_mag | R_johnsoncousins_mag | I_johnsoncousins_mag |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| deg | deg | mag | mag | mag | mas | mas | mas / yr | mas / yr | mas / yr | mas / yr | deg | mag | mag | mag | mag | mag | mag | |
| int64 | float64 | float64 | float32 | float32 | float32 | float64 | float32 | float64 | float32 | float64 | float32 | float64 | float32 | float32 | float32 | float32 | float32 | float32 |
| 1096857033044992512 | 123.46358938838631 | 67.88971682015931 | 20.226247787475586 | 18.9457950592041 | 21.279850006103516 | 2.4612139436267366 | 0.5596178770065308 | -1.5109944465762766 | 0.3861945867538452 | -0.9993581676749135 | 0.646277129650116 | 0.005120868239371059 | 20.55800437927246 | 19.56468391418457 | 22.2702579498291 | 21.203420639038086 | 20.067562103271484 | 18.998441696166992 |
| 1096857101765237760 | 123.43892343048769 | 67.8956124547175 | 21.295581817626953 | 20.320524215698242 | 21.499958038330078 | โโโ | โโโ | โโโ | โโโ | โโโ | โโโ | 0.0069969087815531265 | 21.252859115600586 | 20.969985961914062 | 22.02094841003418 | 21.562204360961914 | 21.033828735351562 | 20.53368377685547 |
| 1096856994390017152 | 123.45645641263971 | 67.88125775716301 | 19.707828521728516 | 18.38322639465332 | 20.979854583740234 | 3.0573802467382465 | 0.3179308772087097 | 11.880533201188976 | 0.22325950860977173 | -7.393675877038789 | 0.30488893389701843 | 0.00906763744984822 | 20.247432708740234 | 19.007596969604492 | 22.09683609008789 | 20.911039352416992 | 19.622631072998047 | 18.409908294677734 |
| 1096857067406032640 | 123.41929334070166 | 67.89178083196823 | 16.634456634521484 | 15.85244083404541 | 17.314313888549805 | 1.2050908672850105 | 0.048259854316711426 | -5.567979326150691 | 0.03303448110818863 | -12.077443510338655 | 0.04770999401807785 | 0.011695937379322676 | 16.615947723388672 | 16.201696395874023 | 17.64654541015625 | 17.0322265625 | 16.364782333374023 | 15.734864234924316 |
| 1096858510515041408 | 123.47577477788626 | 67.89700846015798 | 19.78288459777832 | 18.77142333984375 | 20.774452209472656 | 0.976072598519347 | 0.3294190466403961 | -0.6670059327289899 | 0.23502284288406372 | -5.061786742454724 | 0.31464746594429016 | 0.011969100518846922 | 19.925397872924805 | 19.189992904663086 | 21.412328720092773 | 20.509124755859375 | 19.557979583740234 | 18.662395477294922 |
| 1096857754600039168 | 123.49999720110058 | 67.88908128599442 | 20.955039978027344 | 19.92739486694336 | 21.314929962158203 | โโโ | โโโ | โโโ | โโโ | โโโ | โโโ | 0.018839214907547794 | 20.92664909362793 | 20.54891586303711 | 21.889101028442383 | 21.31561279296875 | 20.68536949157715 | 20.090198516845703 |
| 1096858574938003200 | 123.46783490647054 | 67.90936044690477 | 18.45643424987793 | 17.441452026367188 | 19.556238174438477 | 1.1080267906264099 | 0.1423102468252182 | 6.302811485122927 | 0.09683824330568314 | 2.3875680980172596 | 0.14534229040145874 | 0.020495447027742007 | 18.654342651367188 | 17.837873458862305 | 20.223045349121094 | 19.263147354125977 | 18.25058937072754 | 17.297353744506836 |
| 1096858574938005888 | 123.43623401557618 | 67.91233256108121 | 14.924246788024902 | 14.474855422973633 | 15.206657409667969 | 0.6235000607444191 | 0.021513553336262703 | -2.598814995200761 | 0.015005433931946754 | -0.8877672011204992 | 0.021025778725743294 | 0.022931369613166257 | 14.90665340423584 | 14.801634788513184 | 15.253921508789062 | 15.039621353149414 | 14.719002723693848 | 14.412050247192383 |
| 1096856277132046976 | 123.49405239672897 | 67.87329615053547 | 19.948223114013672 | 19.456560134887695 | 20.21337127685547 | 0.8301177083096152 | 0.3782431483268738 | 0.660914915822167 | 0.2582669258117676 | -3.218612381323739 | 0.34905076026916504 | 0.02353474996760117 | 19.927539825439453 | 19.81319808959961 | 20.29794692993164 | 20.07021713256836 | 19.738399505615234 | 19.421058654785156 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 1096861774690195200 | 123.14975326849779 | 68.01123088350226 | 16.916234970092773 | 16.282197952270508 | 17.327877044677734 | 0.2078815736899861 | 0.058080703020095825 | -2.808386118175398 | 0.04185868799686432 | -3.6260015231907197 | 0.0544656477868557 | 0.16553890346406566 | 16.873727798461914 | 16.64703369140625 | 17.51544952392578 | 17.13039207458496 | 16.665719985961914 | 16.224905014038086 |
| 1096761890930958848 | 123.24776438541268 | 67.7430013300241 | 14.152748107910156 | 13.552937507629395 | 14.589509963989258 | 2.2858515375881505 | 0.015925053507089615 | -5.5572599447806 | 0.010669785551726818 | -4.79061307718862 | 0.015232610516250134 | 0.16564329021784238 | 14.110501289367676 | 13.887518882751465 | 14.743611335754395 | 14.36355972290039 | 13.903173446655273 | 13.466348648071289 |
| 1096863149079727360 | 123.256741372855 | 68.03897948697701 | 16.10749626159668 | 15.485198020935059 | 16.5721492767334 | 0.20533020759581544 | 0.03904438391327858 | 1.117794587712151 | 0.02873515710234642 | 0.8237606307027106 | 0.03848066180944443 | 0.16569279366906325 | 16.064191818237305 | 15.820507049560547 | 16.74494743347168 | 16.337182998657227 | 15.85300064086914 | 15.394023895263672 |
| 1096861637251242880 | 123.10170381740276 | 67.99191724025559 | 15.049181938171387 | 14.546202659606934 | 15.380851745605469 | 0.7811855057495742 | 0.023990202695131302 | 4.12753010552377 | 0.016851527616381645 | -4.718451642753252 | 0.022892599925398827 | 0.16582829787732484 | 15.020024299621582 | 14.876336097717285 | 15.462923049926758 | 15.19316577911377 | 14.82618522644043 | 14.47619915008545 |
| 1096765464343757824 | 123.07334676334233 | 67.80412654206437 | 15.187824249267578 | 14.685460090637207 | 15.519084930419922 | 0.6838498394764968 | 0.02623923309147358 | 3.194437324222604 | 0.01638740487396717 | -9.645988862461584 | 0.021891755983233452 | 0.1659686910976007 | 15.158766746520996 | 15.01546859741211 | 15.600707054138184 | 15.331504821777344 | 14.96498966217041 | 14.615436553955078 |
| 1096766800076504192 | 123.0099793304518 | 67.87725952087362 | 16.725833892822266 | 16.19869613647461 | 17.086366653442383 | 0.2674047225333326 | 0.0514051653444767 | 1.1434576673148544 | 0.03617595508694649 | 0.10167435330908503 | 0.048395272344350815 | 0.16615284375907466 | 16.691946029663086 | 16.527929306030273 | 17.18456268310547 | 16.885997772216797 | 16.494796752929688 | 16.1223087310791 |
| 1096863144782865152 | 123.27317851734385 | 68.04252052176678 | 20.672447204589844 | 20.024959564208984 | 20.881399154663086 | 6.329621303711603 | 0.9460204243659973 | -19.149605794546076 | 0.7373940944671631 | -13.546277576323979 | 1.0426164865493774 | 0.16632746815327087 | 20.641239166259766 | 20.489234924316406 | 21.104543685913086 | 20.822961807250977 | 20.446054458618164 | 20.08684730529785 |
| 1096761238095922816 | 123.42685316330157 | 67.72385932226457 | 19.928386688232422 | 18.73736000061035 | 20.758501052856445 | 1.670723691410339 | 0.41950082778930664 | -1.8159542550555168 | 0.29341042041778564 | -6.6369528544514615 | 0.41385066509246826 | 0.1663646569910922 | 20.079315185546875 | 19.33116340637207 | 21.579856872558594 | 20.667375564575195 | 19.706342697143555 | 18.80147933959961 |
| 1096749521425137280 | 123.48182863404683 | 67.72406176226178 | 18.01885223388672 | 17.27911376953125 | 18.689733505249023 | 0.512780625711869 | 0.10643969476222992 | -1.549766181443848 | 0.07013402134180069 | -1.3352525633127426 | 0.10564824193716049 | 0.16636708946284962 | 17.993247985839844 | 17.604337692260742 | 18.976953506469727 | 18.390769958496094 | 17.749021530151367 | 17.14310646057129 |
Columns from this table can be extracted via their names.
random_stars['ra']
We can also specify the center by using SkyCoord's ability to look up stars by common names.
some_center = SkyCoord.from_name('GJ1214')
some_stars = get_gaia(some_center)
INFO: Query finished. [astroquery.utils.tap.core]
some_stars
| source_id | ra | dec | G_gaia_mag | RP_gaia_mag | BP_gaia_mag | parallax | parallax_error | pmra | pmra_error | pmdec | pmdec_error | distance_from_center | r_sloan_mag | i_sloan_mag | g_sloan_mag | V_johnsoncousins_mag | R_johnsoncousins_mag | I_johnsoncousins_mag |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| deg | deg | mag | mag | mag | mas | mas | mas / yr | mas / yr | mas / yr | mas / yr | deg | mag | mag | mag | mag | mag | mag | |
| int64 | float64 | float64 | float32 | float32 | float32 | float64 | float32 | float64 | float32 | float64 | float32 | float64 | float32 | float32 | float32 | float32 | float32 | float32 |
| 4393265392168829056 | 258.8314799887317 | 4.960575338342743 | 12.996782302856445 | 11.68291187286377 | 14.912440299987793 | 68.29864790496704 | 0.06518708169460297 | 580.202152322342 | 0.059069931507110596 | -749.7132787585067 | 0.046714574098587036 | 0.004213553583360604 | 14.281705856323242 | 12.260824203491211 | 16.261287689208984 | 14.842987060546875 | 13.164945602416992 | 11.584444046020508 |
| 4393265594029572864 | 258.82548059022554 | 4.959673415391515 | 19.814598083496094 | 18.7404842376709 | 20.92361831665039 | -0.12201931576844059 | 0.4233180284500122 | 0.7886772319541978 | 0.38949310779571533 | -5.90216430988526 | 0.31440091133117676 | 0.005436663367761337 | 20.050561904907227 | 19.18158721923828 | 21.666542053222656 | 20.672658920288086 | 19.622066497802734 | 18.633102416992188 |
| 4393265594029578624 | 258.8303453443598 | 4.969318799593391 | 18.467039108276367 | 17.849897384643555 | 18.9268798828125 | 0.32598400597497745 | 0.14732687175273895 | -2.3171063464633663 | 0.13715088367462158 | -2.8002450271574886 | 0.11037397384643555 | 0.0055955418154212495 | 18.423870086669922 | 18.184314727783203 | 19.095197677612305 | 18.692920684814453 | 18.213462829589844 | 17.75888442993164 |
| 4393265594029575936 | 258.8345934758168 | 4.965356067428126 | 19.528406143188477 | 18.817964553833008 | 20.048349380493164 | 0.9195919172227879 | 0.2980462312698364 | -0.13105104020166408 | 0.29258519411087036 | -2.780651379773647 | 0.230753093957901 | 0.005855239245568904 | 19.487468719482422 | 19.182281494140625 | 20.303503036499023 | 19.8166446685791 | 19.26363754272461 | 18.74053192138672 |
| 4393265598326066432 | 258.8260166383157 | 4.969221589104122 | 21.041614532470703 | 19.73952293395996 | 22.038986206054688 | โโโ | โโโ | โโโ | โโโ | โโโ | โโโ | 0.006035423410204868 | 21.349946975708008 | 20.386186599731445 | 23.041173934936523 | 21.99078941345215 | 20.874629974365234 | 19.82403564453125 |
| 4393265392167890176 | 258.8331333378074 | 4.9586369446744065 | 17.20298957824707 | 16.52166175842285 | 17.653566360473633 | 0.31761288226776757 | 0.08060498535633087 | -2.6388754129907195 | 0.07629198580980301 | -1.8090458983625795 | 0.05639905482530594 | 0.0067554765457613535 | 17.1595516204834 | 16.897018432617188 | 17.88279151916504 | 17.450260162353516 | 16.944679260253906 | 16.46577262878418 |
| 4393265594029575424 | 258.8221023063075 | 4.964097257256533 | 18.891849517822266 | 18.464885711669922 | 19.212743759155273 | -0.08964745632392115 | 0.19999991357326508 | -0.21041661007722506 | 0.18089303374290466 | -5.859332991385228 | 0.14873191714286804 | 0.006772384266162155 | 18.87225341796875 | 18.761253356933594 | 19.234365463256836 | 19.011449813842773 | 18.68364715576172 | 18.37002944946289 |
| 4393265353511402752 | 258.8275448277946 | 4.956599989525407 | 18.19046974182129 | 18.28221321105957 | 18.134431838989258 | 0.128803443046689 | 0.1276603788137436 | -2.2870076084982003 | 0.1191125214099884 | -14.33279722520088 | 0.09272509813308716 | 0.007435501213667212 | 18.35614585876465 | 18.585100173950195 | 17.99251365661621 | 18.210838317871094 | 18.253276824951172 | 18.281362533569336 |
| 4393265392167889664 | 258.8328976491856 | 4.957613805209845 | 16.265377044677734 | 15.51598834991455 | 16.87837028503418 | 0.76954057935162 | 0.048896461725234985 | -4.000658586016978 | 0.04738306254148483 | -8.340730069161536 | 0.03560008108615875 | 0.0074532985723650075 | 16.234233856201172 | 15.86851978302002 | 17.17344093322754 | 16.61379623413086 | 15.996045112609863 | 15.412535667419434 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 4393268308448906368 | 258.72897310940243 | 4.963472468196353 | 19.786701202392578 | 18.916301727294922 | 20.808021545410156 | 0.19950324277927545 | 0.35724377632141113 | 1.720337020375147 | 0.3665202260017395 | -6.160889755693347 | 0.30260518193244934 | 0.09955077068142124 | 19.882102966308594 | 19.221895217895508 | 21.282590866088867 | 20.437091827392578 | 19.546154022216797 | 18.70703887939453 |
| 4393275115973872128 | 258.8294812377683 | 5.0634971814688114 | 18.059717178344727 | 17.4281063079834 | 18.5201473236084 | 0.10891950096582698 | 0.12421425431966782 | -2.5535336119216034 | 0.12789541482925415 | -1.3509734707538876 | 0.09003755450248718 | 0.09958655503775107 | 18.016359329223633 | 17.770557403564453 | 18.70192527770996 | 18.291358947753906 | 17.80476188659668 | 17.343536376953125 |
| 4390261934419773952 | 258.9199204847354 | 4.922753388828661 | 20.119403839111328 | 19.462875366210938 | 20.767452239990234 | -0.4009253301230668 | 0.4742431938648224 | -2.4164993371569627 | 0.5000970363616943 | -2.018081806711649 | 0.3630990982055664 | 0.09958761635388078 | 20.083026885986328 | 19.74432945251465 | 20.968515396118164 | 20.440725326538086 | 19.85149383544922 | 19.294599533081055 |
| 4393262467293345920 | 258.78715760018787 | 4.873393994658311 | 17.87934684753418 | 17.42167091369629 | 18.19889259338379 | 0.17389487264683223 | 0.11520089209079742 | 0.0072955718401033 | 0.09989719837903976 | -4.234450077111919 | 0.07727477699518204 | 0.09961421234303547 | 17.856271743774414 | 17.734285354614258 | 18.245620727539062 | 18.00690460205078 | 17.665912628173828 | 17.34005355834961 |
| 4393263498085508480 | 258.7464218179167 | 4.907450994487482 | 17.84841537475586 | 17.252365112304688 | 18.27007484436035 | 0.06147753884283451 | 0.10275927931070328 | -3.608316414650199 | 0.09851474314928055 | -0.6464691458675303 | 0.08229614049196243 | 0.09969850104903731 | 17.80680274963379 | 17.59146499633789 | 18.422075271606445 | 18.052385330200195 | 17.600858688354492 | 17.172277450561523 |
| 4393264361375716992 | 258.92231618290253 | 4.9280466284948 | 18.882038116455078 | 17.304718017578125 | 19.79410743713379 | โโโ | โโโ | โโโ | โโโ | โโโ | โโโ | 0.09974216346382465 | 19.330183029174805 | 18.19590950012207 | 21.128589630126953 | 19.99004554748535 | 18.764585494995117 | 17.611148834228516 |
| 4393269927653385472 | 258.76972258111397 | 5.04440980073196 | 15.45716667175293 | 14.876876831054688 | 15.867270469665527 | 0.6121189038834349 | 0.03552864491939545 | -4.4141787868072395 | 0.033296313136816025 | -0.966707238307875 | 0.025193918496370316 | 0.09977418975288643 | 15.41669750213623 | 15.212335586547852 | 16.00615119934082 | 15.651449203491211 | 15.212702751159668 | 14.796011924743652 |
| 4393269687132214656 | 258.74330938418376 | 5.016032320994322 | 19.42879295349121 | 18.631284713745117 | 20.06942367553711 | 0.33799186631762845 | 0.3193487226963043 | 2.2610459821616113 | 0.3499622941017151 | -6.655832456359581 | 0.2663625180721283 | 0.09993209431067575 | 19.406841278076172 | 19.00441551208496 | 20.4157772064209 | 19.814477920532227 | 19.158958435058594 | 18.540180206298828 |
| 4393269893293365504 | 258.75858952711974 | 5.035265196488171 | 21.10805892944336 | โโโ | โโโ | โโโ | โโโ | โโโ | โโโ | โโโ | โโโ | 0.09998460449950151 | nan | nan | nan | nan | nan | nan |
Visualizing Gaia Data ๐จยถ
It'd be nice to be able to see this information in a way that's not just a giant table of data. Let's use the plot_gaia tool to plot one of the tables we've already downloaded.
from astr3510 import plot_gaia
plot_gaia(some_stars)
We can change options to modify the appearance of this finder chart, including changing which filter is used to set the relative sizes of the points.
plot_gaia(some_stars,
filter='i_sloan',
faintest_magnitude_to_show=17,
faintest_magnitude_to_label=13,
size_of_zero_magnitude=200,
unit=u.arcsec)
With these tools, you can access a table of data and a quick visualization for any patch of the sky you care about!
cluster_center = SkyCoord.from_name("NGC 457")
cluster_stars = get_gaia(cluster_center)
plot_gaia(cluster_stars, faintest_magnitude_to_label=10)
INFO: Query finished. [astroquery.utils.tap.core]