[AstroPy] Question re objects within radius of given co-ordinates

Peter Dzwig pdzwig at summaventures.com
Sat Apr 3 11:59:05 EDT 2021


I can't speak to your specific point, but I am doing a similar operation
trying to cross-correlate two datasets from publications.

To cut a long story short, it appears that there are some
inconsistencies among naming across various DBs, :-( which may go some
way to explaining what you see.

Peter

On 03/04/2021 12:20, Jim Singh wrote:
> Thanks so much for your response Eric, yes this helps tremendously!
> 
> I did some additional filtering and formatting (to enable direct
> comparison of returned results with a star map on the phone), and they
> match up nicely. 
> However, as can be seen below, some rows are without names - this is
> expected? 
> 
> from astroquery.vizier import Vizier
> import astropy.units as u
> v = Vizier(columns=['Name','_RAJ2000', '_DEJ2000',
> 'Vmag'],column_filters={"Vmag":"<8"})
> result = v.query_region("rigel", radius="02d00m00s", catalog="V/50")
> for table_name in result.keys():
>     table = result[table_name]
>     table['_RAJ2000'] = table['_RAJ2000'].to(u.hourangle)
>     table['_RAJ2000'].info.format = '10.3f'
>     print(table)
> 
> Name    _RAJ2000   _DEJ2000   Vmag
>                 hourangle     deg      mag
> --------- ---------- ---------- -----
>                5.139  -8.665000  5.78
> 69Lam Eri      5.152  -8.754167  4.27
>                5.226  -8.147778  6.37
> 19Bet Ori      5.242  -8.201667  0.12
> 20Tau Ori      5.293  -6.844444  3.60
> 
> Also, presumably another Vizier DB contains a mapping of 'common name'
> (where one exists) to the Bayer name? I tried for example the online
> form for IV/22 "Common Name Cross Index" and although for our first
> example it found 'BET CEN' when given the RA and Dec of Hadar, it did
> not return anything in the 'name' field (where I'd expected 'Hadar' to
> appear):
> 
> *RAJ2000
> "h:m:s"* 	*DEJ2000
> "d:m:s"* 	*Vmag
> mag* 	BFno 	name
> 14 03 49.408 	-60 22 22.79 	0.61 	        BET CEN 	 
> 
> 
>  
> Regards,
> Jim
> 
> On Sat, Apr 3, 2021 at 5:26 AM Eric Jensen <ejensen1 at swarthmore.edu
> <mailto:ejensen1 at swarthmore.edu>> wrote:
> 
>     Hi Jim, 
> 
>     If you’re primarily interested in bright stars, and in names of
>     objects, then the VO search probably isn’t the best bet.  As you’ve
>     found, it has lots of objects, and no common names for them. 
> 
>     I’d suggest querying one of the catalogs from Vizier
>     (https://vizier.u-strasbg.fr/viz-bin/VizieR
>     <https://vizier.u-strasbg.fr/viz-bin/VizieR>), for example the
>     Bright Star Catalogue.  
> 
>     Here’s a query that will do a 2-degree-radius search around Hadar
>     for stars brighter than V=6:
> 
>     from astroquery.vizier import Vizier
>     result = Vizier.query_region("Hadar", radius="02d00m00s", 
>                                  catalog=‘V/50',
>                                  column_filters={"Vmag":"<6"})
>     print(result[0])
> 
>     which prints: 
> 
>      HR    Name    HD   ADS  VarID   RAJ2000    DEJ2000   Vmag  B-V  SpType NoteFlag
>                                      "h:m:s"    "d:m:s"   mag   mag                 
>     ---- ------- ------ --- ------- ---------- --------- ----- ----- ------ --------
>     5267 Bet Cen 122451     Bet Cen 14 03 49.4 -60 22 23  0.61 -0.23  B1III        *
> 
> 
>     The reason you have to use ‘print(result[0])’ rather than just
>     ‘print(result)’ is that the query returns a *list* of tables, though
>     in this case the list only has one element.  The string ‘V/50’ is
>     the Vizier code for the Yale Bright Star Catalogue.  You can find
>     other suitable catalogs to query by searching Vizier and noting down
>     the code, typically a Roman numeral followed by some digits.  Each
>     catalog will have different column names, so you may have to adapt
>     your ‘column_filters’ argument above to the names of columns
>     actually present in the catalog, or it won’t have any effect. 
> 
>     Hope this helps, 
> 
>     Eric
> 
>>     On Apr 2, 2021, at 1:23 AM, Jim Singh <jimmyboysingh at gmail.com
>>     <mailto:jimmyboysingh at gmail.com>> wrote:
>>
>>     Hi,
>>     I am a beginner astropy user. What I'd like to be able to do is
>>     obtain the names and RA and Dec of all objects above a certain
>>     Magnitude, within a given angular FOV centered on a given named
>>     object. If I try this for example...
>>
>>     from astropy.coordinates import SkyCoord
>>     from astroquery.vo_conesearch import ConeSearch
>>     c = SkyCoord.from_name('hadar')
>>     print(c)
>>     result = ConeSearch.query_region(c, '0.1 deg')
>>     result.sort('Mag')
>>     print(result)
>>
>>     ...I get 2670 rows back. Assuming this is the right basic approach
>>     to begin with, is there any way to constrain the search to just
>>     those rows with 'Mag'>8 for instance? Only a handful of records
>>     would qualify in this case. My typical search radius would be a
>>     couple of degrees, so if the query were to return everything like
>>     above, it would take forever to execute. Also, how to get the name
>>     of each qualifying object? Would it entail a separate lookup on
>>     the column 'objID'?
>>
>>     Thanks for your help!
>>
>>     Regards,
>>     Jim
>>     _______________________________________________
>>     AstroPy mailing list
>>     AstroPy at python.org <mailto:AstroPy at python.org>
>>     https://mail.python.org/mailman/listinfo/astropy
>>     <https://mail.python.org/mailman/listinfo/astropy>
> 
>     _______________________________________________
>     AstroPy mailing list
>     AstroPy at python.org <mailto:AstroPy at python.org>
>     https://mail.python.org/mailman/listinfo/astropy
>     <https://mail.python.org/mailman/listinfo/astropy>
> 
> 
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
> 

-- 

Dr. Peter Dzwig


More information about the AstroPy mailing list